On Sun, Dec 09, 2007 at 11:54:25AM -0500, Andrew Chernow wrote:
That explains why my libpq code was getting 3AM for without time zone
values. I am using code from src/interfaces/ecpg/pgtypeslib/timestamp.c
timestamp2tm(). That uses localtime() after converting the timestamp to an
epoch
Or was the code incorrectly used?
Hard for me to say, but I think its about caller context. The way I am using it
might be different ... hey the function was static ... copy paster be warned!
The code appears to be doing the same thing as the backend (with the exclusion
of backend stuff
I am trying to add support for timestamps in our proposed libpq PGparam patch.
I ran into something I don't really understand. I wasn't sure if it was my
libpq code that was wrong (converts a binary timestamp into a time_t or struct
tm) so I tried it from psql.
Server is using EST (8.3devel)
On Sunday 09 December 2007 09:44, Andrew Chernow wrote:
I am trying to add support for timestamps in our proposed libpq PGparam
patch. I ran into something I don't really understand. I wasn't sure if it
was my libpq code that was wrong (converts a binary timestamp into a time_t
or struct tm)
Okay, thanks. So using WITHOUT TIME ZONE basically means, store the provided
value as UTC. Meaning, 8AM EST NOW() is stored/treated as 8AM UTC.
That explains why my libpq code was getting 3AM for without time zone values.
I am using code from src/interfaces/ecpg/pgtypeslib/timestamp.c
On Sunday 09 December 2007 11:54, Andrew Chernow wrote:
Okay, thanks. So using WITHOUT TIME ZONE basically means, store the
provided value as UTC. Meaning, 8AM EST NOW() is stored/treated as 8AM
UTC.
Not quite. Using WITHOUT TIME ZONE means to not store any time zone
information. It
Andrew Chernow [EMAIL PROTECTED] writes:
Okay, thanks. So using WITHOUT TIME ZONE basically means, store the provided
value as UTC. Meaning, 8AM EST NOW() is stored/treated as 8AM UTC.
No, I think you are more confused now than you were before.
For both types, the underlying stored value is
got it. stored vs. displyed was confusing me.
Andrew
Tom Lane wrote:
Andrew Chernow [EMAIL PROTECTED] writes:
Okay, thanks. So using WITHOUT TIME ZONE basically means, store the provided
value as UTC. Meaning, 8AM EST NOW() is stored/treated as 8AM UTC.
No, I think you are more confused