in reply to date string conundrum
When you want to add days, it is dangerous to add multiples of 24 hours. There are days that have only 23 hours and others that have 25 hours - the days when daylight savings time gets switched on or off.
I'd use DateTime for the date calculations, but if you insist of doing it yourself, I also use the approach of adding 22 hours until the date part of a timestamp changes and then renormalize the timestamp to 00:00:00 of the days. That way, I'm always safe from DST changes.
|
|---|