2

I am trying to convert date time in epoch to UTC human readable format, I have tried this and this gives me the result in CET but wrong result.

perl -e 'print scalar localtime(1549950859468 / 1000)
Tue Feb 12 06:54:19 2019

How should it be done in any help ?

3
  • I'm confused, why do you / 1000? If I use this: perl -e 'print scalar localtime(1554881524)' it shows the correct time? 1554881524 is about now of course. – Lenniey Apr 10 '19 at 7:29
  • @Lenniey You failed to understand the question :-) – Alex Apr 10 '19 at 8:22
  • hm...obviously :) – Lenniey Apr 10 '19 at 9:20
3

Would:

date -d @$((1549950859468 / 1000)) -u

do?

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.