Re: Storing Olson abbreviation in DateTime::TimeZone::OffsetOnly

[email protected] (Zefram)
Newsgroups perl.datetime
Message-ID <[email protected]>
Evan Carroll wrote:
>I'm still trying to finish up DateTimeX::TimeZone, so I've got a
>question.. I'm looking to store the Olson abbreviation name in
>DateTime::TimeZone::OffsetOnly because it is not easily 1:1.

If you want to store a conventional initialism, then the timezone you're
interested in is more than just an offset.  DT:TZ:OffsetOnly is for
when you Only want the Offset.  A more appropriate way to do what you
want would be a SysV-style timezone string "CST3".  This represents
a timezone that consists of a fixed offset plus an abbreviation.
Try DateTime::TimeZone::SystemV->new("CST3").

-zefram
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.