On 12/31/15 5:05 PM, gkhan wrote:
For
example, this fails because of the day-before-month format:
Right, which is why Tom had in his example:
regression=# set datestyle = dmy;
BTW, my recommendation would be to store in a timestamptz field *with
the correct timezone*, and then convert on output as necessary. This is
easy to do by either
SET timezone
or
SELECT timestamptz_field AT TIME ZONE '...';
If you want the time without DST, you can just use a timezone like '+8'
or '-8'.
Since you're dealing with GPS data and presumably have lat/long, it
shouldn't be hard to do this dynamically either, either by just blindly
dividing longitude by 15 or using actual timezone shape polygons and @>
or <@.
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com
--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general