Time Zone Question

O

Oliver

Hello,

I am writing an application that will be used across multiple time zones
(Eastern to Pacific) and since much of the application revolves around time
stamps, I need a best practice for storing time information in a database
and displaying it correctly to the user (adjusted for his respective time
zone). I have been thinking about using UTC and adjusting everything when I
output it, but then the user cannot use the native data in the database
(e.g. for reporting services).

Is there any elegant way to do this (my dream would be a session-specific
time zone setting that will adjust all date to string and string to date
functions). Anybody had a similar problem?

I CANNOT SAY HOW MUCH YOUR HELP WILL BE APPRECIATED

Oliver
 
D

Dino Chiesa [Microsoft]

Anybody had a similar problem?

Dealing with times across zones is tricky.

Using UTC and converting (late) seems to be a best practice.

The reporting issue - you should be able to solve that with some database
trickery, like UDFs for example. have the user pass his/her timezone into
the query, along with the time, and then within the UDF produce a UTC and
use that for the report.


see also
http://blogs.msdn.com/brada/archive/2004/04/13/112784.aspx
http://www.extremeexperts.com/sql/articles/UDFFunctions.aspx

-D
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top