Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jleclanche/winfiletime
Windows filetime <-> Python datetime conversion ⛺
https://github.com/jleclanche/winfiletime
datetime filetime timestamp win32
Last synced: 1 day ago
JSON representation
Windows filetime <-> Python datetime conversion ⛺
- Host: GitHub
- URL: https://github.com/jleclanche/winfiletime
- Owner: jleclanche
- License: cc0-1.0
- Created: 2018-10-14T05:16:01.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2022-08-31T15:27:31.000Z (about 2 years ago)
- Last Synced: 2024-10-31T10:36:38.383Z (8 days ago)
- Topics: datetime, filetime, timestamp, win32
- Language: Python
- Size: 6.84 KB
- Stars: 6
- Watchers: 1
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# filetime.py
A Python module to convert datetime to/from a
[Win32 FILETIME structure](https://msdn.microsoft.com/en-us/library/windows/desktop/ms724284).[Reference algorithm](https://support.microsoft.com/en-us/help/167296)
## Usage
Install from PyPI: `pip install winfiletime`
Example usage:
```py
import datetime
import winfiletime# Convert a datetime to a filetime
winfiletime.from_datetime(datetime.datetime(2009, 7, 25, 23, 0))
# 128930364000000000# Convert a filetime to a datetime
winfiletime.to_datetime(128930364000000000)
# datetime.datetime(2009, 7, 25, 23, 0)
```## License
This project is hereby released in the Public Domain.
See the `LICENSE` file for the full CC0 license text.