Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

summertime/wintertime change

Status
Not open for further replies.
Sep 10, 2002
12
DK
The time-shift from summertime to wintertime is comming up.
Is that a problem from SQL-server 7 or SQL-server 2000 ?
 
it depends on Windows settings : Control Panel->Date/Time->Time Zone->automaticly ajust...
 
Sorry what I ment was: Is SQL-server able to handle the fact that i.e. the time 02:20 occurs twice?
 
Unfortunately, it does not. We have the same issue with transactional data that is tracked w/ a timestamp. The way we are able to get around it is by turning off the OS system function that takes care of daylight savings time and then during our 1 hour of downtime, later that morning, we send out an SP to update the time to the new time.

This sure becomes an interesting issue for 24/7 shops!

Thanks

J. Kusch
 
As a side note, I have heard of a workaround where you add a field to the table(s) that would be effected by this issue, say a bit field.

Once the time change happens, for the first hour of "new" transactions that are captured between 2:00:00.000 to 2:59.59.999, you set that bit flag to 1.

Now you are able to differentiate between the first set of 2am to 3am set of transactions from the new "daylight savings" set of transactions.

Of course, if there are a bunch of SPs that create this data, it can be a daunting task.

Thanks

J. Kusch
 
What we have done here to get around the problem is to store the UTC (Universal Time) itself, and then using the windows routines to translate into the local times. Now, we enter most of our times manually, so this is an option to us.

Is there a way to tell SQL Server you want to add a UTC time to the time field instead of a local time?

cheers,
Jack

Jack De Winter
Software Developer
MedTel Software
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top