Options
- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Solved
Go to solution
how to read time reported by yarn
Labels:
Super Collaborator
Created ‎06-20-2018 03:45 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
how can I convert this start and finish time to normal date format?
$ yarn application -status application_1517871817099_0015 Application Report : Application-Id : application_1517871817099_0015 Application-Name : distcp Application-Type : MAPREDUCE Queue : default Application Priority : null Start-Time : 1517874876754 Finish-Time : 1517875501288 Progress : 100% State : KILLED Final-State : KILLED
1 ACCEPTED SOLUTION
Super Collaborator
Created ‎06-20-2018 04:30 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ok I found three ways to convert correctly the milliseconds unix time to human readable time format
mysql> select from_unixtime(floor(1517874876754/1000)); +------------------------------------------+ | from_unixtime(floor(1517874876754/1000)) | +------------------------------------------+ | 2018-02-05 18:54:36 | +------------------------------------------+ 1 row in set (0.00 sec) $ awk '{print strftime("%c", ( 1517874876754 + 500 ) / 1000 )}' Mon 05 Feb 2018 06:54:37 PM EST $ date -d @$( echo "(1517874876754+ 500) / 1000" | bc) Mon Feb 5 18:54:37 EST 2018
2 REPLIES 2
Super Collaborator
Created ‎06-20-2018 04:18 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I found two methods online which gives different results , which one is correct ?
$ date -d @1517874876754 Tue Jul 16 02:12:34 EDT 50069
mysql> select from_unixtime(floor(1517875501288/1000)); +------------------------------------------+ | from_unixtime(floor(1517875501288/1000)) | +------------------------------------------+ | 2018-02-05 19:05:01 | +------------------------------------------+
Super Collaborator
Created ‎06-20-2018 04:30 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ok I found three ways to convert correctly the milliseconds unix time to human readable time format
mysql> select from_unixtime(floor(1517874876754/1000)); +------------------------------------------+ | from_unixtime(floor(1517874876754/1000)) | +------------------------------------------+ | 2018-02-05 18:54:36 | +------------------------------------------+ 1 row in set (0.00 sec) $ awk '{print strftime("%c", ( 1517874876754 + 500 ) / 1000 )}' Mon 05 Feb 2018 06:54:37 PM EST $ date -d @$( echo "(1517874876754+ 500) / 1000" | bc) Mon Feb 5 18:54:37 EST 2018
