Re: Re: Time AT TIME ZONE: false result using offset instead of time zone name
| От | Adrian Klaver |
|---|---|
| Тема | Re: Re: Time AT TIME ZONE: false result using offset instead of time zone name |
| Дата | |
| Msg-id | 52FB8D48.6010805@gmail.com обсуждение исходный текст |
| Ответ на | Re: Time AT TIME ZONE: false result using offset instead of time zone name (rawi <only4com@web.de>) |
| Ответы |
Re: Time AT TIME ZONE: false result using offset instead of time
zone name
|
| Список | pgsql-sql |
On 02/12/2014 12:24 AM, rawi wrote: > Adrian Klaver-3 wrote >>> On 02/10/2014 11:54 PM, rawi wrote: >>> [...] >>> SELECT CURRENT_TIMESTAMP AT TIME ZONE 'UTC+01'; >>> >>> timezone >>> timestamp without time zone >>> --------------------------- >>> 2014-02-11 06:23:07.043479 >>> >>> !!! Two hours earlyer, one hour to the east (Azores), not to the west of >>> Greenwich. >>> To get my time one hour west from Greenwich I have to ask: >>> >>> SELECT CURRENT_TIMESTAMP AT TIME ZONE 'UTC-01'; >>> >>> Is this inverse calculation intently? >> >> Yes. >> >> http://www.postgresql.org/docs/9.3/interactive/datatype-datetime.html#DATATYPE-TIMEZONES >> >> 8.5.3. Time Zones >> >> .. Another issue to keep in mind is that in POSIX time zone names, >> positive offsets are used for locations west of Greenwich. Everywhere >> else, PostgreSQL follows the ISO-8601 convention that positive timezone >> offsets are east of Greenwich > > Oh... oh... Disconcerting... I've just learned, that even javascript is > returning negative offsets for western situated browsers... Welcome to the wacky world of time, it is all relative:) The choices are handle everything as UTC until you present to the end user or use actual timezones, for example, America/Los_Angeles. To illustrate, in your original post you said: "But it would be easier to ask a specific time offset (got from a client around the world), so for me +01 hour" Do you know if that offset supplied by the client was POSIX or ISO in its sign? > > Thank you! > Regards, Rawi > > > -- Adrian Klaver adrian.klaver@gmail.com
В списке pgsql-sql по дате отправления: