Skip to content

Instantly share code, notes, and snippets.

@b4hand
Created February 27, 2014 18:34
Show Gist options
  • Select an option

  • Save b4hand/9256186 to your computer and use it in GitHub Desktop.

Select an option

Save b4hand/9256186 to your computer and use it in GitHub Desktop.
#!/usr/bin/perl
# We want all of our time computations to be made in UTC
BEGIN { $ENV{TZ} = 'UTC'; }
use strict;
use warnings;
use Date::Format;
my $format = '%Y-%m-%d %H:%M:%S+0';
while (my $line = <>) {
chomp($line);
print time2str($format, $line), "\n";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment