In general, when I need to do any sort of interaction with dates and times, and especially if I need to do math, I use the DateTime module. It handles all this in a clean, consistent way.
If you are disinclined to go outside built-ins, I would suggest using GMT for all your times rather than mixing. You can then either log in GMT, or do the conversion on output. Playing games with differing internal representations just creates unnecessary headaches in my experience. In this case, just consistently calling gmtime will "force Perl to PERMANENTLY consider I am working in GMT+0 location", rather than creating a strange hack that will confuse you next time you have to work with this module and may possibly cause messy action at a distance.
#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.
In reply to Re: Difficult on use time
by kennethk
in thread Difficult on use time
by exilepanda
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |