TheBigAmbulance has asked for the wisdom of the Perl Monks concerning the following question:

Greetings...

I am needing to convert time zones based on a numerical value using GMT as the 0 point. (i.e. CST=-5, EST=-4).

All of the forums perl script examples I have been able to find all use the names.

Does anyone have an example of some perl module that can parse/change the time stamp utilizing the actual number instead of the name?

Replies are listed 'Best First'.
Re: Yet Again... Time Zone Conversion
by frozenwithjoy (Priest) on Jul 16, 2012 at 15:46 UTC
    In addition to time zone names, DateTime will also take an offset string. An excerpt from its docs:
    This string may be an Olson DB time zone name ("America/Chicago"), an offset string ("+0630"), or the words "floating" or "local". See the DateTime::TimeZone documentation for more details.
      DateManip will as well. Of course you need to be aware that an offset string doesn't map one-to-one to a timezone, so depending on what you are actually trying to do, you may find that there are assumptions made by DateManip (or DateTime) that lead to unexpected results.