I would look at Time::Local as an alternative - but I haven't benchmarked any of the relevant modules. Time::Local talks about caching, so maybe it is faster, or maybe that:s just an indication of how slow it was in the beginning.
To generate the initial timestamp, use Time::Local::timelocal to convert your date into a unix epoch timestamp. Then use localtime to (re)create the timestamp. Add the equivalent of 1 hour, 2 minutes and 3 seconds in seconds to your timestamp and redo. At least if you don't have to worry about daylight savings time adjustments, this will work. If you cross such adjustment boundaries, you will need to think long and hard about how they will affect your output.
In reply to Re: Simple date and time manipulation
by Corion
in thread Simple date and time manipulation
by tsk1979
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |