# NOTE: Derived from web_diary_dir/lib/DateTime/Zone.pm.
# Changes made here will be lost when autosplit again.
# See AutoSplit.pm.
package DateTime::Zone;

#line 212 "web_diary_dir/lib/DateTime/Zone.pm (autosplit into web_diary_dir/lib/auto/DateTime/Zone/tz_offset.al)"
sub tz_offset (;$$)
{
	my ($zone, $time) = @_;

	return &tz_local_offset() unless($zone);

	$time = time() unless $time;
	my(@l) = localtime($time);
	my $dst = $l[8];

	$zone = lc $zone;

	if($zone =~ /^(([\-\+])\d\d?)(\d\d)$/) {
		my $v = $2 . $3;
		return $1 * 3600 + $v * 60;
	} elsif (exists $dstZone{$zone} && ($dst || !exists $Zone{$zone})) {
		return $dstZone{$zone};
	} elsif(exists $Zone{$zone}) {
		return $Zone{$zone};
	}
	undef;
}

# end of DateTime::Zone::tz_offset
1;
