I am stumble in the scenario where i need to convert UTC DateTime stored in the database to local time once the user retrieved the data and rendered in their respective browsers.
My current solution is: to get the timezone of the current user and store in session and use that to convert the utc to local time.
current problem: the timezone of the current user might vary for daylight saving. and for scenario where the timezone of the current user is in daylight saving mode but the date to convert is in regular time.
1. user saved data on regular time
2. during daylight saving user open the app and retrieved data
3. when converting the datetime the timezone that will be use is daylight saving
1. What is the best approach to handle datetime conversion from utc to local time where daylight saving is also considered?
2. Is there a way to determine if the utc is in daylight or ordinary time?