Permalink
Browse files

--tz feature so you can see times in UTC (or any other time-zone)

  • Loading branch information...
1 parent 3b18a43 commit bb12326106a8b3102cd6da423bf98674ecc21639 @hoytech committed Feb 23, 2014
Showing with 4 additions and 1 deletion.
  1. +1 −0 README.pod
  2. +3 −1 bin/log-defer-viz
View
1 README.pod
@@ -44,6 +44,7 @@ Note: The only input format currently implemented is newline-separated JSON.
$ log-defer-viz --since-now ## show relative to now times
## like "34 minutes ago"
$ log-defer-viz --notimers ## don't show timer chart
+ $ log-defer-viz --tz UTC ## show times in UTC, not local
=head1 DATA SECTION
View
4 bin/log-defer-viz
@@ -28,6 +28,7 @@ my @opt_spec = (
'date!',
'since-now',
+ 'tz=s',
## FILTERING
@@ -249,7 +250,7 @@ sub handle_entry {
} else {
require Date::Format;
- $formatted = Date::Format::time2str("%Y-%m-%d %a %H:%M:%S$millis %Z", $entry->{start});
+ $formatted = Date::Format::time2str("%Y-%m-%d %a %H:%M:%S$millis %Z", $entry->{start}, $opt->{tz});
}
my $date_header = "------ $formatted ($entry->{start}) ------";
@@ -442,6 +443,7 @@ Note: The only input format currently implemented is newline-separated JSON.
$ log-defer-viz --since-now ## show relative to now times
## like "34 minutes ago"
$ log-defer-viz --notimers ## don't show timer chart
+ $ log-defer-viz --tz UTC ## show times in UTC, not local
=head1 DATA SECTION

0 comments on commit bb12326

Please sign in to comment.