Hi there!
I would like an opinion whether my approach might be a good one to my problem.
Here is the deal: I am saving all my datetime data in UTC format in my database as follows:
DateTime.Now.ToUniversalTime();
So what I need now is to show the dates in local timezone, always offsetting from the UTC saved date. So I am thinking of creating a huge enum to comprise all possible world timezones, and then save each user's timezone in my database. So whenever I need to show dates, I first check the user's timezone and then look for the offset value in the enum based on the user's timezone. Having this information, all I have to do is adding or subtracting minutes/hours or days from the UTC original date that was saved in DB.
Is this a good approach?
All ideas are ...
Go to the complete details ...