Skip to content

Instantly share code, notes, and snippets.

@alabamenhu
Last active August 8, 2020 19:58
Show Gist options
  • Save alabamenhu/70f753835e0f7a28f7ad7e2d56b9603e to your computer and use it in GitHub Desktop.
Save alabamenhu/70f753835e0f7a28f7ad7e2d56b9603e to your computer and use it in GitHub Desktop.
World Clock
use DateTime::Timezones;
sub MAIN (**@timezones) {
react whenever Supply.interval(1) {
my $time = DateTime.new: now;
say " {.hh-mm-ss} {.tz-abbr}\t{.olson-id}"
for @timezones.map({$time.in-timezone: $_});
print "\x001b[F" xx @timezones;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment