Skip to content

Commit b71e40c

Browse files
committed
update missing timestap
1 parent da280b6 commit b71e40c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

cloudpathlib/http/httppath.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import datetime
12
import http
23
import os
34
from pathlib import Path, PurePosixPath
@@ -112,7 +113,9 @@ def stat(self, follow_symlinks: bool = True) -> os.stat_result:
112113
None, # gid,
113114
meta.get("size", 0), # size,
114115
None, # atime,
115-
meta.get("last_modified", 0).timestamp(), # mtime,
116+
meta.get(
117+
"last_modified", datetime.datetime.fromtimestamp(0)
118+
).timestamp(), # mtime,
116119
None, # ctime,
117120
)
118121
)

0 commit comments

Comments
 (0)