FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Replace the deprecated datetime.datetime.utcfromtimestamp by stefan6419846 · Pull Request #62 · aboutcode-org/commoncode · GitHub

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
7 changes: 5 additions & 2 deletions src/commoncode/filetype.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#

import os
from datetime import datetime
from datetime import datetime, timezone
Comment thread
pombredanne marked this conversation as resolved.

from commoncode.system import on_posix
from commoncode.functional import memoize
Expand Down Expand Up @@ -164,7 +164,10 @@ def get_last_modified_date(location):
yyyymmdd = ''
if is_file(location):
utc_date = datetime.isoformat(
datetime.utcfromtimestamp(os.path.getmtime(location))
datetime.fromtimestamp(
Comment thread
pombredanne marked this conversation as resolved.
os.path.getmtime(location),
tz=timezone.utc,
Comment thread
pombredanne marked this conversation as resolved.
)
)
yyyymmdd = utc_date[:10]
return yyyymmdd
Expand Down

Back | FazBrowse Home | New Git URL