No, it's not. It's actually vitally important: It handles daylight savings time, leap seconds, and other time oddities, by ignoring them and resetting things.
You're right that it's not quite a no-op. It changes the hour to 12 if it's 11 or 13.
You're wrong about it being vitally important. Quite the opposite, it's of no consequence. You'll never be off noon by more than an hour.
strftime is nice, but since you need to separate the info out anyway, I figured we might as well leave it off.
No you don't have to "separate the info out". Not into variables, at least. It keeps the code compact. That's what makes it nice.
I don't care what timezone you are in, just make sure you aren't using midnight, as you'll get errors!
You missed the entire point. If you use timegm+gmtime, you don't have to make sure you aren't using midnight. You won't get errors.
In reply to Re^4: Increment through date range by day with only standard modules.
by ikegami
in thread Increment through date range by day with only standard modules.
by dbmathis
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |