Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I am new to Perl and would like to perform a quick conversion using a one liner Perl execution in bash shell.
x=1388679108 perl -e 'print strftime("%m%d%H%M", $x)' 01021611
I am looking for a way to change any given epoch time to a date format of month/day/hour/minute that will be used for a time stamp. I am aware that perl -e "print scalar localtime $x" will provide me with "Thu Jan 2 16:11:48 2014". But, I am looking for a different type of output format.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Epoch to specific output
by Utilitarian (Vicar) on Jan 02, 2014 at 16:45 UTC | |
by Anonymous Monk on Jan 02, 2014 at 16:58 UTC | |
by toolic (Bishop) on Jan 02, 2014 at 17:01 UTC | |
by Anonymous Monk on Jan 02, 2014 at 18:19 UTC | |
by toolic (Bishop) on Jan 02, 2014 at 18:39 UTC | |
by Utilitarian (Vicar) on Jan 02, 2014 at 17:02 UTC | |
|
Re: Epoch to specific output
by atcroft (Abbot) on Jan 02, 2014 at 18:07 UTC | |
by Anonymous Monk on Jan 02, 2014 at 18:47 UTC | |
by aitap (Curate) on Jan 02, 2014 at 21:01 UTC | |
by choroba (Cardinal) on Jan 02, 2014 at 21:31 UTC | |
|
Re: Epoch to specific output
by oiskuu (Hermit) on Jan 02, 2014 at 20:04 UTC | |
by Anonymous Monk on Jan 02, 2014 at 21:53 UTC | |
|
Re: Epoch to specific output
by kcott (Archbishop) on Jan 03, 2014 at 04:21 UTC |