Timezones - Howto & best practices

  • I'm looking for advice, tips, articles  & best practices to implement timezones/daylight savings in a single sql server database setup (located in GMT+1) that needs to support clients from different timezones. The clients need to be able to visualize and update dates & times according their local regional settings.

    I'm currently thinking of storing all datetime fileds in UTC format and handle the timezone at the client (vb appl) and i'm wondering if there is a solution where the OS / OLEDB driver handles the timezone conversion (based on client & server regional settings). If not I do not directly see how I can handle timezones in a vb db grid that interacts directly with a table or updateable view?

    Any advice or real life experience would be welcome..

    Rgds, Bart

     

     

  • Storing all datetimes in UTC is definitely the way to go. The client should be responsible for formatting the output as necessary, incl applying regional settings for timezones and DST.

    Why would you want to have a grid that is directly connected to a table? Why not put some domain logic in between. That is normally a better design, precisely for issues such as this.

  • I was looking for a solution where the OLE DB driver automatically translates UTC datetime fields according the clients timezone. Much like the setSessionTimeZone of Orcale.

     

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

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