Fixed timestamp issue by changing mktime to calendar.timegm
This commit is contained in:
parent
a54d10efab
commit
1bd543c64d
2 changed files with 5 additions and 3 deletions
|
|
@ -3,6 +3,7 @@ import os
|
||||||
import shutil
|
import shutil
|
||||||
import datetime
|
import datetime
|
||||||
import time
|
import time
|
||||||
|
import calendar
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from sortedcontainers import SortedDict
|
from sortedcontainers import SortedDict
|
||||||
|
|
@ -14,8 +15,8 @@ temp_path = r"..\vid"
|
||||||
output_file = r"..\goes18_2024.mp4"
|
output_file = r"..\goes18_2024.mp4"
|
||||||
interp_file = r"..\goes18_2024_interp.mp4"
|
interp_file = r"..\goes18_2024_interp.mp4"
|
||||||
ffmpeg_path = r"..\ffmpeg.exe"
|
ffmpeg_path = r"..\ffmpeg.exe"
|
||||||
starttime = time.mktime(datetime.datetime(2024, 1, 1, tzinfo=datetime.timezone.utc).timetuple())
|
starttime = calendar.timegm(datetime.datetime(2024, 1, 1, tzinfo=datetime.timezone.utc).timetuple())
|
||||||
stoptime = time.mktime(datetime.datetime(2025, 1, 1, tzinfo=datetime.timezone.utc).timetuple())
|
stoptime = calendar.timegm(datetime.datetime(2025, 1, 1, tzinfo=datetime.timezone.utc).timetuple())
|
||||||
min_file_size = 350000 # Detect and remove corrupted files by filtering by file size
|
min_file_size = 350000 # Detect and remove corrupted files by filtering by file size
|
||||||
max_file_size = 450000
|
max_file_size = 450000
|
||||||
encoding_crf = 16
|
encoding_crf = 16
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
import os
|
import os
|
||||||
import time
|
import time
|
||||||
|
import calendar
|
||||||
import datetime
|
import datetime
|
||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
from multiprocessing import Queue, Process
|
from multiprocessing import Queue, Process
|
||||||
|
|
@ -226,7 +227,7 @@ if __name__ == "__main__":
|
||||||
sattelite = file_parts[2]
|
sattelite = file_parts[2]
|
||||||
measure_end_time = datetime.datetime.strptime(file_parts[4][1:16], "%Y%m%dT%H%M%S")
|
measure_end_time = datetime.datetime.strptime(file_parts[4][1:16], "%Y%m%dT%H%M%S")
|
||||||
measure_end_time.replace(tzinfo=datetime.timezone.utc)
|
measure_end_time.replace(tzinfo=datetime.timezone.utc)
|
||||||
measure_end_time = time.mktime(measure_end_time.timetuple())
|
measure_end_time = calendar.timegm(measure_end_time.timetuple())
|
||||||
files_sorted_by_timestamp[measure_end_time].append(os.path.join(root,f))
|
files_sorted_by_timestamp[measure_end_time].append(os.path.join(root,f))
|
||||||
|
|
||||||
work_queue = Queue(maxsize = 3)
|
work_queue = Queue(maxsize = 3)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue