Re: Having a hard time understanding time zone

From: David Johnston <polobo(at)yahoo(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Having a hard time understanding time zone
Date: 2014-04-06 22:01:10
Message-ID: 1396821670554-5798921.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Robert DiFalco wrote
> But oddly both set the date field to the localized time in Java and not
> the
> UTC time.

Likely what you are seeing is the fact that most client libraries, when
given a timestamptz, display the result to the user in their local timezone.

PostgreSQL only stores the normalized UTC time and doesn't even know after
the fact what the originally specified timezone was.

If you specify the value correctly it shouldn't matter whether the
transmitted value is UTC or Siberian time since ultimately all you are
sending is an point-in-time value with units which can be transformed to
other units based upon timezone rules.

David J.

--
View this message in context: http://postgresql.1045698.n5.nabble.com/Having-a-hard-time-understanding-time-zone-tp5798914p5798921.html
Sent from the PostgreSQL - jdbc mailing list archive at Nabble.com.

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Robert DiFalco 2014-04-06 22:37:56 Re: Having a hard time understanding time zone
Previous Message Dave Cramer 2014-04-06 20:45:53 Re: Having a hard time understanding time zone