Created
August 10, 2015 00:22
-
-
Save beppu/03b7069e22ca5a0836e6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use JSON; | |
while (<>) { | |
my $relay = decode_json $_; | |
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(int($relay->{coldTimestamp} / 1000)); | |
my $date = sprintf('%d-%02d-%02d', $year+1900, $mon+1, $mday); | |
print "$date $_" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment