comparison fetch_weather.pl @ 192:52d8fa967c24

Fix timestamp parsing.
author Matti Hamalainen <ccr@tnsp.org>
date Fri, 13 Jun 2014 22:32:15 +0300
parents 127b1d0f874e
children 93ec73deebc5
comparison
equal deleted inserted replaced
191:127b1d0f874e 192:52d8fa967c24
57 57
58 58
59 sub parse_timestamp($$) 59 sub parse_timestamp($$)
60 { 60 {
61 # XXX: A bit of a hack, but it works. 61 # XXX: A bit of a hack, but it works.
62 return Time::Piece->strptime($_[0], "%OH:%OM")->epoch - 62 return Time::Piece->strptime($_[0], "%OH:%OM")->epoch + $_[1];
63 Time::Piece->strptime("00:00", "%OH:%OM")->epoch + $_[1];
64 } 63 }
65 64
66 65
67 sub gmt_time_fmt($) 66 sub gmt_time_fmt($)
68 { 67 {