Web::DateTime::TimeZone
Time zone for Web
SYNOPSIS
use Web::DateTime::TimeZone;
$tz = Web::DateTime::TimeZone->new_from_offset (+9*60*60+0*60);
warn $tz->to_offset_string;
DESCRIPTION
The Web::DateTime::TimeZone class can be used to represent a time zone.
METHODS
Following methods are available:
$tz = Web::DateTime::TimeZone->new_utc-
Create a new time zone object representing the UTC time zone.
$tz = Web::DateTime::TimeZone->new_from_offset ($integer)-
Create a new time zone object whose offset is the integer (in seconds) specified as the argument.
false = $tz->is_date_timetrue = $tz->is_time_zonefalse = $tz->is_durationfalse = $tz->is_interval-
Return whether the object is of the specified type or not.
$number = $tz->offset_as_seconds-
Return the number of seconds of the time-zone offset.
$sign = $tz->offset_sign-
Return the sign of the time-zone offset. If the offset is positive, number
+1is returned. Otherwise, number-1is returned. $number = $tz->offset_hour-
Return the hour component of the time-zone offset (without sign).
$number = $tz->offset_minute-
Return the minute component of the time-zone offset.
$string = $tz->to_offset_string-
Serialize the time-zone offset as an HTML time-zone offset string [HTML].
DEPENDENCY
The module requires Perl 5.8 or later.
SEE ALSO
SPECIFICATION
- HTML
-
HTML Standard
<http://www.whatwg.org/specs/web-apps/current-work/>.
AUTHOR
Wakaba <wakaba@suikawiki.org>.
LICENSE
Copyright 2008-2014 Wakaba <wakaba@suikawiki.org>.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.