Dealing with different time zones...

  • Greetings all...

    Been some time since I've been out here snooping around. Here is my issue, something that I haven't had to deal with before. I just got finished creating a web solution w/ a SQL Server 2005 back end. Solution works great however when I published the database to a 3rd party provider I found that the OS local time is in a different time zone than mine.

    All through out my app I am posting update dates/times as a form of a simple audit. However when I report this information back because the host SQL Server box is 3 time zones away all of my times are off.

    Is there an easy fix to this? Where does this get corrected, front end (ASP.NET/VB.NET) or back end, SS2005?

    Any input would be greatly appreciated.

    Kurt

    Kurt W. Zimmerman
    SR DBA
    Lefrak Organization
    New York, NY

    http://www.linkedin.com/in/kurtwzimmerman

  • You'll either need to record the server and it's location as part of the same key that the timestamp is in, or at least the time zone. SQL 2008 has a data type that can do that, but 2005 you pretty much have to roll your own.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply