Converting accross timezones and compensating for daylight savings time.

Discussion in 'ASP.NET 2.0' started by Daniel, Aug 19, 2006.

  1. Part of my website is a calendar/scheduled events. What i need to be able to do is display the dates/times of those events in the local time of the user.


    Storing the timezone ofa registered user and converting times from utc to that timezone is the easy part. What's got me annoyed is trying to factor in daylight savings time, which i've never really understood to begin with. Does anyone know a good way to do this?
     
  2. I've seen some websites that ask your timezone, also ask if you do daylight savings.


    Joel Thoms
    DiscountASP.NET
    http://www.DiscountASP.NET
     
  3. Bruce

    Bruce DiscountASP.NET Staff

  4. What i ended up doing was just creating a TimeZoneInformationtable in my database that keeps:
    ID
    name of the timezone
    offset from utc
    When DST starts
    When DST ends

    And then have a TZIfield in the userdata table thats says which timezone the user belongs too. Now all i need is to find a list of the main timezones (Easy part) and which of them use dst and the precise times their dst starts and ends (pain in the rear part) so i can fill the tzi table in.
     

Share This Page