Skip to content

Commit a5a6639

Browse files
authored
Merge pull request #27 from biochimia/patch-3
Use time.time() to obtain unix timestamp
2 parents ad38384 + 7edc316 commit a5a6639

File tree

1 file changed

+2
-1
lines changed
  • mkdocs_git_revision_date_localized_plugin

1 file changed

+2
-1
lines changed

mkdocs_git_revision_date_localized_plugin/util.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# standard library
22
import logging
33
import os
4+
import time
45
from datetime import datetime
56

67
# 3rd party
@@ -116,7 +117,7 @@ def get_revision_date_for_file(
116117

117118
# create timestamp
118119
if not unix_timestamp:
119-
unix_timestamp = datetime.utcnow().timestamp()
120+
unix_timestamp = time.time()
120121
logging.warning("%s has no git logs, using current timestamp" % path)
121122

122123
return self._date_formats(unix_timestamp=unix_timestamp, locale=locale)

0 commit comments

Comments
 (0)