Re: How to get the time zone offset
От
Cezariusz Marek
Тема
Re: How to get the time zone offset
Дата
Msg-id
BC2C748E0016466C8D312DCC999FAB33@co382.comarch.net
Ответ на
Re: How to get the time zone offset (Adrian Klaver)
Список
Дерево обсуждения
How to get the time zone offset "Cezariusz Marek" <cezariusz.marek@comarch.pl>
Re: How to get the time zone offset Adrian Klaver <adrian.klaver@gmail.com>
Re: How to get the time zone offset "Cezariusz Marek" <cezariusz.marek@comarch.pl>
Re: How to get the time zone offset Adrian Klaver <adrian.klaver@gmail.com>
Re: How to get the time zone offset Adrian Klaver <adrian.klaver@gmail.com>
Re: How to get the time zone offset "Cezariusz Marek" <cezariusz.marek@comarch.pl>
Adrian Klaver wrote: > On Friday, December 30, 2011 6:18:05 am Cezariusz Marek wrote: >> I need to convert timestamp to a format with a time zone offset, like this: >> select clock_timestamp()::text; >> and it returns the following value: >> "2011-12-30 11:59:06.538+01" >> What is the default format for timestamp::text conversion? I've tried this: >> select to_char(clock_timestamp(), 'YYYY-MM-DD HH24:MI:SSTZ'); >> But it gives me "CET" instead of "+01": >> "2011-12-30 11:59:06CET" > > Maybe I am not understanding what you want, but why not: > > select clock_timestamp()::text; > > It gives you the format you want. Because I need more control. In this case I need the date in XML format, so it will be something like this: select to_char(clock_timestamp(), 'YYYY-MM-DD"T"HH24:MI:SSTZ'); Is the timestamp::text format always the same, regardless of the current locale and language settings? -- ____________________________________________________________________ Cezariusz Marek mob: +48 608 646 494 http://www.comarch.com/ tel: +48 33 815 0734 ____________________________________________________________________
В списке pgsql-general по дате отправления
От: Nigel Heron
Дата:
От: Adrian Klaver
Дата: