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.
In reply to Re: date string conundrum
by Corion
in thread date string conundrum
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |