Convert ActiveDirectory timestamp into regular one. Arrow (solved) - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: Convert ActiveDirectory timestamp into regular one. Arrow (solved) (/thread-30704.html) |
Convert ActiveDirectory timestamp into regular one. Arrow (solved) - SpongeB0B - Nov-02-2020 Hi everyone, I try to convert the timestamp from active directory (accountExpires field) 132556896000000000 representing : 1/21/2021 12:00:00 AM Pacific Standard Time Microsoft reference Wrote:This value represents the number of 100-nanosecond intervals since January 1, 1601 (UTC). If possible, I would like to use arrow who work nice to work with dates/time The simplest will be to convert the AD timestamp in "Arrow timestamp" first. But I don't know how is constructed the arrow timestamp :/ (I supposes unix time ? ) https://arrow.readthedocs.io/en/stable/ Any ideas ? RE: Convert ActiveDirectory timestamp into regular one. Arrow - SpongeB0B - Nov-02-2020 Nevermind I found If somebody is interested, let me know and i'll post an explanation. RE: Convert ActiveDirectory timestamp into regular one. Arrow (solved) - bowlofred - Nov-02-2020 Divide by 10000000, subtract 11644473600, and feed that in as a unix timestamp. >>> arrow.get(132556896000000000/10000000 - 11644473600) <Arrow [2021-01-21T08:00:00+00:00]> |