Daylight saving time calculation

  • Thread starter Thread starter mazdotnet
  • Start date Start date
M

mazdotnet

Hi guys,

I have to make a event signup page for our company that would display
the event time/date in 3 different time zones (Eastern - New York,
Central - Chicago, and Pacific - San Francisco). To do this. I convert
the inputed date from local time zone and convert it into UTC and store
it in the database (correct me if I'm wrong please). Next to display it
I would add the correct time zone difference value (-5 for Eastern).
How to do I handle the daylight saving time though? For example the -5
Eastern time is right now -4. Is there a way to do this automatically?
Any samples would be greatly appreciated.


Thanks
M.
 
You're right, keep UTC value in database and then display calculated user's
local time (to check if the asp.net sever is in daylight saving time period
use System.TimeZone.CurrentTimeZone.IsDaylightSavingTime(...))

hope this helps
 
Back
Top