I have a DMARC report that includes:
<date_range>
<begin>1500249600</begin>
<end>1500335999</end>
</date_range>
How do I convert the dates to something human?
There was a converter from DMARC, here it is https://dmarcian.com/dmarc-xml/
And AFAIR there's also converted dates. Correct me if I'm wrong.
The date
function in bash
is quick and easy for casual conversion, such as when reading a DMARC report. On OSX:
$ date -jr 1606953599
Wed 2 Dec 2020 23:59:59 GMT
The -j
flag prevents date
from setting the date on your system. -r
tells it there's a UNIX Time in seconds following, which is the DMARC report format for date_range
fields.
I just got same question today and came to this post from Google search :)
However, it seems that site link, mentioned in previous answer, is no longer exist.
Here are working links to a few of such time converters:
Links below are outdated, currently for similar purpose one can use https://www.unixtimestamp.com/
http://www.convert-unix-time.com/?t=1500249600 gives: timestamp 1500249600 means: In your local time zone: Monday 17th July 2017 10:00:00 AM UTC: Monday 17th July 2017 12:00:00 AM
http://www.convert-unix-time.com/?t=1500335999 gives: timestamp 1500335999 means: In your local time zone: Tuesday 18th July 2017 09:59:59 AM UTC: Monday 17th July 2017 11:59:59 PM
Try on Linux command line:
date --date='@1500249600'
Sun 16 Jul 2017 05:00:00 PM PDT
If you are on a system with MySQL such as MacOS, etc, open up a CLI and type
mysql> select from_unixtime(1500249600);
You'll get: +---------------------------+ | from_unixtime(1661212800) | +---------------------------+ | 2022-08-22 17:00:00 | +---------------------------+ 1 row in set (0.02 sec)
If you are on a system with MySQL such as MacOS, etc, open up a CLI and type
mysql> select from_unixtime(1500249600);
You'll get:
+---------------------------+ | from_unixtime(1500249600) | +---------------------------+ | 2017-07-16 17:00:00 | +---------------------------+ 1 row in set (0.02 sec)