Created
October 2, 2015 13:31
-
-
Save creaktive/89088e1fbede425f8470 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 qw(all); | |
use DateTime; | |
my $year = $ARGV[0] || DateTime->now->year; | |
for ( | |
my ($here, $there) = map { | |
DateTime->new( | |
year => $year, | |
month => 1, | |
day => 1, | |
hour => 12, | |
time_zone => $_, | |
) | |
} qw(Europe/Amsterdam America/Sao_Paulo); | |
$here->year == $year; | |
$here->add(days => 1) && $there->add(days => 1) | |
) { | |
my $delta = $there - $here; | |
printf "%s\t%d\n", | |
$here->dmy, | |
$delta->in_units("hours"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment