Skip to content

Instantly share code, notes, and snippets.

@mfontani
Created May 28, 2015 17:19
Show Gist options
  • Save mfontani/707c6415984da704df3b to your computer and use it in GitHub Desktop.
Save mfontani/707c6415984da704df3b to your computer and use it in GitHub Desktop.
#!/usr/bin/env perl
use common::sense;
use DateTime;
use Text::Table;
my $now = DateTime->from_epoch(epoch => time, time_zone => 'UTC');
my @where = qw<
UTC
Europe/London
Europe/Rome
America/Chicago
America/Los_Angeles
Australia/Sydney
>;
my @lines;
for my $where (@where) {
my $when = $now->clone->set_time_zone($where);
push @lines, [ $where, $when->ymd, $when->hms ];
}
my $tb = Text::Table->new(qw<Where Day Hour>);
$tb->load(@lines);
print $tb;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment