convert_epoch - Convert various epoch times to Time::Moment times.
convert_epoch - convert the given number to a date
convert_epoch [OPTIONS] number [number ...]
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
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.
Prints extra messages.
Prints a brief help message and exits.
Prints the manual page and exits.
Reverse the conversions (from Time::Moment to given epoch type).
Prints results in more detail.
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 1.003002
Tim Heaney <heaney@cpan.org>
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.
To install Time::Moment::Epoch, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Time::Moment::Epoch
CPAN shell
perl -MCPAN -e shell install Time::Moment::Epoch
For more information on module installation, please visit the detailed CPAN module installation guide.