@@ -475,7 +475,7 @@ def get_tree_size(executor, thread, root, top, path, sizes, inodes, depth=0, max
475475
476476 # check for invalid time stamps
477477 try :
478- mtime = datetime .fromtimestamp (int (f_stat .st_mtime ), timezone .utc ).isoformat ()
478+ mtime = datetime .fromtimestamp (int (f_stat .st_mtime ), timezone .utc ).replace ( tzinfo = None ). isoformat ()
479479 except ValueError :
480480 logmsg = '[{0}] MTIME TIMESTAMP WARNING {1}' .format (thread , os .path .join (parent_path , file_name ))
481481 logger .warning (logmsg )
@@ -486,7 +486,7 @@ def get_tree_size(executor, thread, root, top, path, sizes, inodes, depth=0, max
486486 pass
487487
488488 try :
489- atime = datetime .fromtimestamp (int (f_stat .st_atime ), tz = timezone .utc ).isoformat ()
489+ atime = datetime .fromtimestamp (int (f_stat .st_atime ), tz = timezone .utc ).replace ( tzinfo = None ). isoformat ()
490490 except ValueError :
491491 logmsg = '[{0}] ATIME TIMESTAMP WARNING {1}' .format (thread , os .path .join (parent_path , file_name ))
492492 logger .warning (logmsg )
@@ -497,7 +497,7 @@ def get_tree_size(executor, thread, root, top, path, sizes, inodes, depth=0, max
497497 pass
498498
499499 try :
500- ctime = datetime .fromtimestamp (int (f_stat .st_ctime ), timezone .utc ).isoformat ()
500+ ctime = datetime .fromtimestamp (int (f_stat .st_ctime ), timezone .utc ).replace ( tzinfo = None ). isoformat ()
501501 except ValueError :
502502 logmsg = '[{0}] CTIME TIMESTAMP WARNING {1}' .format (thread , os .path .join (parent_path , file_name ))
503503 logger .warning (logmsg )
@@ -636,7 +636,7 @@ def get_tree_size(executor, thread, root, top, path, sizes, inodes, depth=0, max
636636
637637 # handle timestamp errors in s3fs and possibly other fuse mounts
638638 try :
639- mtime = datetime .fromtimestamp (int (d_stat .st_mtime ), timezone .utc ).isoformat ()
639+ mtime = datetime .fromtimestamp (int (d_stat .st_mtime ), timezone .utc ).replace ( tzinfo = None ). isoformat ()
640640 except ValueError :
641641 logmsg = '[{0}] MTIME TIMESTAMP WARNING {1}' .format (thread , os .path .join (parent_path , file_name ))
642642 logger .warning (logmsg )
@@ -647,7 +647,7 @@ def get_tree_size(executor, thread, root, top, path, sizes, inodes, depth=0, max
647647 pass
648648
649649 try :
650- atime = datetime .fromtimestamp (int (d_stat .st_atime ), timezone .utc ).isoformat ()
650+ atime = datetime .fromtimestamp (int (d_stat .st_atime ), timezone .utc ).replace ( tzinfo = None ). isoformat ()
651651 except ValueError :
652652 logmsg = '[{0}] ATIME TIMESTAMP WARNING {1}' .format (thread , os .path .join (parent_path , file_name ))
653653 logger .warning (logmsg )
@@ -658,7 +658,7 @@ def get_tree_size(executor, thread, root, top, path, sizes, inodes, depth=0, max
658658 pass
659659
660660 try :
661- ctime = datetime .fromtimestamp (int (d_stat .st_ctime ), timezone .utc ).isoformat ()
661+ ctime = datetime .fromtimestamp (int (d_stat .st_ctime ), timezone .utc ).replace ( tzinfo = None ). isoformat ()
662662 except ValueError :
663663 logmsg = '[{0}] CTIME TIMESTAMP WARNING {1}' .format (thread , os .path .join (parent_path , file_name ))
664664 logger .warning (logmsg )
0 commit comments