Allow timezone spec without minutes
This commit is contained in:
parent
2ef9920fd9
commit
f2e93268d7
|
@ -113,7 +113,8 @@ sub add_timestring {
|
|||
my $timestamp;
|
||||
if (defined ($zone)) {
|
||||
# adjust for timezone
|
||||
my ($zs, $zh, $zm) = $zone =~ /([+-])(\d\d)(\d\d)/;
|
||||
my ($zs, $zh, $zm) = $zone =~ /([+-])(\d\d)(\d\d)?/;
|
||||
$zm //= 0;
|
||||
$min -= ($zs eq '-' ? -1 : +1) * ($zh * 60 + $zm);
|
||||
$timestamp = timegm_nocheck($sec, $min, $hour, $day, $mon-1, $year);
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue