Re: [GENERAL] How to get the time zone offset

2011-12-30 Thread Cezariusz Marek
Cezariusz Marek wrote: > I need to convert timestamp to a format with a time zone offset, like this: > [...] I'm very sorry for multiple posting, those messages were holded because of some filters, and now apparently someone approved them. --

[GENERAL] How to get the time zone offset

2011-12-30 Thread Cezariusz Marek
I need to convert timestamp to a format with a time zone offset, like this: select clock_timestamp()::text; which returns: "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(), '-MM-DD HH24:MI:SSTZ'); Bu

[GENERAL] How to get the time zone offset using to_char

2011-12-30 Thread Cezariusz Marek
I need to convert timestamp to a format with a time zone offset, like this: select clock_timestamp()::text; which returns: "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(), '-MM-DD HH24:MI:SSTZ'); But

[GENERAL] How to get the time zone offset using to_char

2011-12-30 Thread Cezariusz Marek
I need to convert timestamp to a format with a time zone offset, like this: select clock_timestamp()::text; which returns: "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(), '-MM-DD HH24:MI:SSTZ'); But

[GENERAL] How to get the time zone offset using to_char

2011-12-30 Thread Cezariusz Marek
I need to convert timestamp to a format with a time zone offset, like this: select clock_timestamp()::text; which returns: "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(), '-MM-DD HH24:MI:SSTZ'); But

[GENERAL] How to get the time zone offset

2011-12-30 Thread Cezariusz Marek
I need to convert timestamp to a format with a time zone offset, like this: select clock_timestamp()::text; which returns: "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(), '-MM-DD HH24:MI:SSTZ'); Bu

Re: [GENERAL] How to get the time zone offset

2011-12-30 Thread Adrian Klaver
On Friday, December 30, 2011 8:19:51 am Cezariusz Marek wrote: > > Is the timestamp::text format always the same, regardless of the current > locale and language settings? Now I have an answer. It can be changed via the DateStyle setting in postgresql.conf http://www.postgresql.org/docs/9.1/in

Re: [GENERAL] How to get the time zone offset

2011-12-30 Thread Adrian Klaver
On Friday, December 30, 2011 8:19:51 am Cezariusz Marek wrote: > > 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(), '-MM-DD"T"HH24:MI:SSTZ'); So something like this: test(5432)postgres=#select

Re: [GENERAL] How to get the time zone offset

2011-12-30 Thread Cezariusz Marek
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 forma

Re: [GENERAL] How to get the time zone offset

2011-12-30 Thread Adrian Klaver
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:

[GENERAL] How to get the time zone offset

2011-12-30 Thread Cezariusz Marek
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(), '-MM-D