Reshma Shinde wrote:
Hi,
    I need to convert TIMEZONE GMT +/- offset to
canonical name that is for example US/Arizona format.
I need a perl module which takes input "GMT-7" or
offset in seconds for the same and gives output
"US/Arizona".
Thanks and regards,
-Reshma

G'day Reshma,

Unfortunately this is 100% impossible. There are many named zones that share the same UTC offset and so you can't get any more detail from an offset than the offset itself.

You *would* be able to loop over all the timezone in the database and make a list of those with that offset on a particular date. (Remember that offsets change through the year to account for DST as well)

Cheers!
Rick Measham

Reply via email to