Handling the Dates in Distributed DB

  • hi all,

    I have a serious problem with my date fields in database. please suggest me what would be the best practice to handle the dates in distributed database environments.

    like in my country A and the other country B have the time difference of 3 Hr between them. so in my country A 12.00am struck before the country B. and if i have closed my month end financial reports on this time and date according to country A. then my entries during that 3 Hrs have been lost.

    please let me know how can i handle this date problem in my database, is there any function or any other theory.??

    Thanks in advance and waiting for guidence.

     

    Noman

  • The method that I have used in the past is to pick a single time zone as the time of record and to then keep track of the offset from that time zone in the local configuration.  My suggestion would be to use GMT.

    WABALUBADUBDUB

  • It can be helpful to use the GetUTCDate() function, which returns current Universal Coordinated Time/ Greenwich Mean Time, based on the local time and timezone settings of the server SQL Server is running on.

  • Ward Pond addresses this issue in a recent blog post.

    Database Programming: Slaying The Time Zone Conversion Beast (or at least rendering it comatose)

    You may take a look at that as he provides a solution to the issue.

    K. Brian Kelley
    @kbriankelley

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

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