Different time zones

Post new topic   Reply to topic

View previous topic View next topic Go down

Different time zones

Post  dellsters on Thu Mar 25, 2010 8:10 am

We have 2 groups of users that are divided when it comes to looking at time. One group prefers looking at data in PST time and the other group in EST time. What is the best way to model this requirement? Would I put 2 sets of columns in the time and day dimensions in both time zones and let the users choose which one they want to look at??


Last edited by dellsters on Thu Apr 08, 2010 10:24 am; edited 1 time in total

dellsters

Posts: 22
Join date: 2009-02-11

View user profile

Back to top Go down

Re: Different time zones

Post  ngalemmo on Thu Mar 25, 2010 9:44 am

The common way to deal with multiple time zones is similar to dealing with multiple currencies. You identify a standard time (usually UTC, aka GMT) and store the standard time and a local time (the time used in the transaction). If you need to restate time, you base it off the standard time. Your database can hold a simple table with time zones and offsets from UTC to convert, or, in many cases, database systems have functions that will do that for you.

ngalemmo

Posts: 557
Join date: 2009-05-16
Location: Los Angeles

View user profile http://dimensionaldw.com

Back to top Go down

Re: Different time zones

Post  dellsters on Thu Mar 25, 2010 2:19 pm

With the Oracle function to translate time zones, is it even worth saving it in both local and UTC? I could just store one as timestamp with time zone column and translate with the Oracle function?

dellsters

Posts: 22
Join date: 2009-02-11

View user profile

Back to top Go down

Re: Different time zones

Post  ngalemmo on Fri Mar 26, 2010 9:52 am

If you are going to store one value, and you need to deal with different time zones, the best option is to use UTC. You will not need to store a time zone, unless you want to know the local time, and UTC doesn't change... there is no daylight savings time and it isn't subject to political interpretation.

ngalemmo

Posts: 557
Join date: 2009-05-16
Location: Los Angeles

View user profile http://dimensionaldw.com

Back to top Go down

View previous topic View next topic Back to top


Permissions of this forum:
You cannot reply to topics in this forum