NAME
convert_epoch - Convert various epoch times to Time::Moment times.
NAME
convert_epoch - convert the given number to a date
SYNOPSIS
convert_epoch [OPTIONS] number [number ...]
EXAMPLES
Default is Unix time and brief output.
$ ./convert_epoch 1234567890
2009-02-13T23:31:30Z
Choose a different conversion.
$ ./convert_epoch --conversion=google_calendar 1234567890
2007-03-16T23:31:30Z
You can use a short option too.
$ ./convert_epoch -c google_calendar 1234567890
2007-03-16T23:31:30Z
You can ask for more details with verbose output.
$ ./convert_epoch 1234567890 --verbose
unix: 1234567890 => 2009-02-13T23:31:30Z
This is handy if you're doing more than one conversion at a time.
$ ./convert_epoch -c google_calendar 1234567890 1500000000
2007-03-16T23:31:30Z
2015-03-17T02:40:00Z
$ ./convert_epoch -c google_calendar 1234567890 1500000000 -v
google_calendar: 1234567890 => 2007-03-16T23:31:30Z
google_calendar: 1500000000 => 2015-03-17T02:40:00Z
And downright necessary if you're doing more than one conversion type as well.
$ ./convert_epoch -c unix -c google_calendar 1234567890 1500000000
2009-02-13T23:31:30Z
2007-03-16T23:31:30Z
2017-07-14T02:40:00Z
2015-03-17T02:40:00Z
$ ./convert_epoch -c unix -c google_calendar 1234567890 1500000000 -v
unix: 1234567890 => 2009-02-13T23:31:30Z
google_calendar: 1234567890 => 2007-03-16T23:31:30Z
unix: 1500000000 => 2017-07-14T02:40:00Z
google_calendar: 1500000000 => 2015-03-17T02:40:00Z
You can reverse the calculations too.
$ ./convert_epoch --reverse 2009-02-13T23:31:30Z
1234567890
$ ./convert_epoch -r -c unix -c google_calendar -v 2009-02-13T23:31:30Z
unix: 2009-02-13T23:31:30Z => 1234567890
google_calendar: 2009-02-13T23:31:30Z => 1297899090
OPTIONS
- --conversion=STRING
-
Use STRING as the conversion type. Choices are:
apfs chrome cocoa dos google_calendar icq java mozilla ole symbian unix uuid_v1 windows_date windows_file windows_system
Default is unix. This option can be repeated for more than one conversion at a time.
- --debug
-
Prints extra messages.
- --help
-
Prints a brief help message and exits.
- --man
-
Prints the manual page and exits.
- --reverse
-
Reverse the conversions (from Time::Moment to given epoch type).
- --verbose
-
Prints results in more detail.
DESCRIPTION
convert_epoch will apply the given conversions from Time::Moment::Epoch to the given numbers (or to the given dates, if reverse option is used).
VERSION
version 1.003003
AUTHOR
Tim Heaney <heaney@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2017 by Tim Heaney.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.