Re: [GENERAL] time zone problem

2012-01-16 Thread Adrian Klaver
On Monday, January 16, 2012 5:50:42 am Cefull Lo wrote: > Hi, > I figure it out. > If only the offset from UTC is given, you may try > > select current_timestamp at time zone (select name from > pg_catalog.pg_timezone_names where utc_offset= interval '+8 hours' limit 1) > > Would give the exact t

Re: [GENERAL] time zone problem

2012-01-16 Thread Adrian Klaver
On Monday, January 16, 2012 5:50:42 am Cefull Lo wrote: > Hi, > I figure it out. > If only the offset from UTC is given, you may try > > select current_timestamp at time zone (select name from > pg_catalog.pg_timezone_names where utc_offset= interval '+8 hours' limit 1) > > Would give the exact t

Re: [GENERAL] time zone problem

2012-01-16 Thread Cefull Lo
Hi, I figure it out. If only the offset from UTC is given, you may try select current_timestamp at time zone (select name from pg_catalog.pg_timezone_names where utc_offset= interval '+8 hours' limit 1) Would give the exact timestamp at those time zone. On Fri, Jan 13, 2012 at 11:59 PM, Cefull

Re: [GENERAL] time zone problem

2012-01-13 Thread Steve Crawford
On 01/13/2012 08:18 AM, Tom Lane wrote: Cefull Lo writes: I'm located in Hong Kong, UTC+8 time zone. When I select current_timestamp; 2012-01-13 23:56:16.825558+08 However, when I select current_timestamp at time zone 'UTC+8'; I expect the result is the same as the above one. Sorry, but it i

Re: [GENERAL] time zone problem

2012-01-13 Thread Tom Lane
Cefull Lo writes: > I'm located in Hong Kong, UTC+8 time zone. When I > select current_timestamp; > 2012-01-13 23:56:16.825558+08 > However, when I > select current_timestamp at time zone 'UTC+8'; > I expect the result is the same as the above one. Sorry, but it isn't. A time zone name spelled

[GENERAL] time zone problem

2012-01-13 Thread Cefull Lo
Hi everybody, I'm located in Hong Kong, UTC+8 time zone. When I select current_timestamp; gives now --- 2012-01-13 23:56:16.825558+08 However, when I select current_timestamp at time zone 'UTC+8'; I expect the result is the same as the above one. But