• ghanshyam.kundu (9/7/2011)


    thanks all,

    as per sean, i am thinking to come up with a solution that at the time of saving the datetime i have to save the offset of it with respect to GMT. and i will add or minus the offset when i will convert it to local time zone datetime. but my query is will it differ when it comes to day light saving, because at that time it differ. so suppose a scenario like this, i am saving a record on march with offset like 5 hrs now i am seeing it on December which is like 4 hrs difference so at the time of fetching won't it give wrong data.

    Yes, that's exactly the problem that Sean described in the posting before yours. The best thing to do is to simply state that historical data is always shown in UTC. This will make sure that

    a) local (timezone) differences do not mess up proper ordering of events, plus

    b) that the time of an event happening in a period near a daylight-saving-time switch-moment is unambiguously defined: UTC does not have daylight saving time.



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?