Safely convert UTC datetimes to local time (based on TZ) for calculations?
- by James
Following from my last question which @Jon Skeet gave me a lot of help with (thanks again!)
I am now wondering how I can safely work with date/times, stored as UTC, when they are converted back to Local Date/Time.
As Jon indicated in my last question using DateTimeOffset represents an instant in time and there is no way to predict what the local time would be say a minute later. I need to be able to do calculations based on these date/times.
So how can I assure when I pull the dates from the database, convert them to local date/time and do specific calculations on them they are going to be accurate?