Problems with the time in data type timestamp without time zone

Started by américo bravo astroñaover 8 years ago5 messagesgeneral
Jump to latest
#1américo bravo astroña
americobravo@gmail.com

Hi,

I have a program that saves information in a DB Postgresql need to extract
data from date and time of that DB but when I retrieve the date and time
information is always ahead 3 hours, the type of data that has that field
is timestamp without time zone,

Please forgive my english I'm using translator.

I appreciate your time and attention.

Best regards.

#2David G. Johnston
david.g.johnston@gmail.com
In reply to: américo bravo astroña (#1)
Re: Problems with the time in data type timestamp without time zone

On Wed, Oct 18, 2017 at 8:21 AM, américo bravo astroña <
americobravo@gmail.com> wrote:

Hi,

I have a program that saves information in a DB Postgresql need to extract
data from date and time of that DB but when I retrieve the date and time
information is always ahead 3 hours, the type of data that has that field
is timestamp without time zone,

Please forgive my english I'm using translator.

​A minimal SQL example of your problem would help.

David J.​

#3Basques, Bob (CI-StPaul)
bob.basques@ci.stpaul.mn.us
In reply to: David G. Johnston (#2)
Re: Problems with the time in data type timestamp without time zone

Where is the machine running the database physically located, in another timezone possibly?

bobb

On Oct 18, 2017, at 10:33 AM, David G. Johnston <david.g.johnston@gmail.com<mailto:david.g.johnston@gmail.com>> wrote:

On Wed, Oct 18, 2017 at 8:21 AM, américo bravo astroña <americobravo@gmail.com<mailto:americobravo@gmail.com>> wrote:
Hi,

I have a program that saves information in a DB Postgresql need to extract data from date and time of that DB but when I retrieve the date and time information is always ahead 3 hours, the type of data that has that field is timestamp without time zone,

Please forgive my english I'm using translator.

​A minimal SQL example of your problem would help.

David J.​

Don’t ever wrestle with a pig. You’ll both get dirty, but the pig will enjoy it.
—Cale Yarborough

#4américo bravo astroña
americobravo@gmail.com
In reply to: David G. Johnston (#2)
Re: Problems with the time in data type timestamp without time zone

We are using two different programs within the same computer, a program
saves the data with date and time in the DB and we are doing another
program to retrieve that information with date and time to generate
reports, all this within the same computer.

Best regards.

2017-10-18 11:33 GMT-04:00 David G. Johnston <david.g.johnston@gmail.com>:

Show quoted text

On Wed, Oct 18, 2017 at 8:21 AM, américo bravo astroña <
americobravo@gmail.com> wrote:

Hi,

I have a program that saves information in a DB Postgresql need to
extract data from date and time of that DB but when I retrieve the date and
time information is always ahead 3 hours, the type of data that has that
field is timestamp without time zone,

Please forgive my english I'm using translator.

​A minimal SQL example of your problem would help.

David J.​

#5rob stone
floriparob@gmail.com
In reply to: américo bravo astroña (#4)
Re: Problems with the time in data type timestamp without time zone

On Thu, 2017-10-19 at 10:28 -0400, américo bravo astroña wrote:

We are using two different programs within the same computer, a
program saves the data with date and time in the DB and we are doing
another program to retrieve that information with date and time to
generate reports, all this within the same computer.

Best regards.

2017-10-18 11:33 GMT-04:00 David G. Johnston <david.g.johnston@gmail.
com>:

On Wed, Oct 18, 2017 at 8:21 AM, américo bravo astroña <americobrav
o@gmail.com> wrote:

Hi,

I have a program that saves information in a DB Postgresql need
to extract data from date and time of that DB but when I retrieve
the date and time information is always ahead 3 hours, the type
of data that has that field is timestamp without time zone,

Please forgive my english I'm using translator.

A minimal SQL example of your problem would help.

David J.

Please do not top post on this list.

Your times are in UTC. You'll need to use the "AT TIME ZONE" construct
to display them in local time.

HTH,

Robert

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general