Mercurial > hg > egg-tcls
changeset 195:9eee4e1b757c
Slight adjustments.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 16 Jun 2014 01:54:56 +0300 |
parents | 55ed3db51ee7 |
children | a38c123921a9 |
files | fetch_weather.pl |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/fetch_weather.pl Mon Jun 16 00:46:40 2014 +0300 +++ b/fetch_weather.pl Mon Jun 16 01:54:56 2014 +0300 @@ -59,7 +59,7 @@ sub parse_timestamp($$) { # XXX: A bit of a hack, but it works. - return Time::Piece->strptime($_[0], "%OH:%OM")->epoch + $_[1]; + return Time::Piece->strptime($_[0], "%H:%M")->epoch + $_[1]; } @@ -365,7 +365,7 @@ if ($oupdate) { my $tmp = $oupdate->{"nodes"}[0]{"text"}; if ($tmp =~ /:\s+(\d\d\.\d\d\.\d\d\d\d)\s+(\d\d:\d\d)/) { - $time_base = Time::Piece->strptime($1, "%Od.%Om.%Y")->epoch; + $time_base = Time::Piece->strptime($1." 00:00", "%d.%m.%Y %H:%M")->epoch; } }