Chris Montgomery wrote:
>
> What's the best way to compensate for time on a server in a hosted
> environment when the time is set to a different time than a user's local
> time zone? Ex: client is in Central Time, server is on Eastern Time (one
> hour ahead); client wants everything to reflect local time.

I use the AT TIME ZONE functionality from SQL, it even
compensates for daylight savings time:

testDB=> select '2003-12-31 12:00:00' AT TIME ZONE 'cet';
       timezone
---------------------
  2003-12-12 12:00:00

testDB=> select '2003-07-31 12:00:00' AT TIME ZONE 'cet';
       timezone
---------------------
  2003-06-12 11:00:00

Jochem

--
Who needs virtual reality
if you can just dream?
     - Loesje


[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to