2 deleted 36 characters in body
source | link

Log file contains date format in 2017-03-15T08:00:23.698411Z format. If this timing is in UTC which is 2017-03-15T08:00:23.698411Z(time and date is 08:00:23 and 2017-03-15) and you need to convert it in IST. Use below command for last hour

date -d '2017-03-15T08:00:23.698411Z last hours' -u +%s

1489561223

date -d @1489561223 +"%Y/%m/%d-%H:%M:%S"

2017/03/15-07:00:23

want to go back 2 hours ago,then use "2 hours ago" instead of "last hours".

Note:- I am running above command in linux server and my linux server timing is in UTC.If you want to run above command in IST linux server,then you have to add another 5 hours 30 minutes(eg:- "6 hours 30 minutes ago" instead of "last hours").

hope this will help you a lot,thanks

Log file contains date format in 2017-03-15T08:00:23.698411Z format. If this timing is in UTC which is 2017-03-15T08:00:23.698411Z(time and date is 08:00:23 and 2017-03-15) and you need to convert it in IST. Use below command for last hour

date -d '2017-03-15T08:00:23.698411Z last hours' -u +%s

1489561223

date -d @1489561223 +"%Y/%m/%d-%H:%M:%S"

2017/03/15-07:00:23

want to go back 2 hours ago,then use "2 hours ago" instead of "last hours".

Note:- I am running above command in linux server and my linux server timing is in UTC.If you want to run above command in IST linux server,then you have to add another 5 hours 30 minutes(eg:- "6 hours 30 minutes ago" instead of "last hours").

hope this will help you a lot,thanks

Log file contains date format in 2017-03-15T08:00:23.698411Z format. If this timing is in UTC which is 2017-03-15T08:00:23.698411Z(time and date is 08:00:23 and 2017-03-15) and you need to convert it in IST. Use below command for last hour

date -d '2017-03-15T08:00:23.698411Z last hours' -u +%s

1489561223

date -d @1489561223 +"%Y/%m/%d-%H:%M:%S"

2017/03/15-07:00:23

want to go back 2 hours ago,then use "2 hours ago" instead of "last hours".

Note:- I am running above command in linux server and my linux server timing is in UTC.If you want to run above command in IST linux server,then you have to add another 5 hours 30 minutes(eg:- "6 hours 30 minutes ago" instead of "last hours").

1
source | link

Log file contains date format in 2017-03-15T08:00:23.698411Z format. If this timing is in UTC which is 2017-03-15T08:00:23.698411Z(time and date is 08:00:23 and 2017-03-15) and you need to convert it in IST. Use below command for last hour

date -d '2017-03-15T08:00:23.698411Z last hours' -u +%s

1489561223

date -d @1489561223 +"%Y/%m/%d-%H:%M:%S"

2017/03/15-07:00:23

want to go back 2 hours ago,then use "2 hours ago" instead of "last hours".

Note:- I am running above command in linux server and my linux server timing is in UTC.If you want to run above command in IST linux server,then you have to add another 5 hours 30 minutes(eg:- "6 hours 30 minutes ago" instead of "last hours").

hope this will help you a lot,thanks