Skip to content

Commit

Permalink
Merge pull request #918 from argilo/historical-speedup
Browse files Browse the repository at this point in the history
Speed up log file processing
  • Loading branch information
darksidelemm authored Oct 12, 2024
2 parents af3d8ba + fffa363 commit cd7028b
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions auto_rx/autorx/log_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,16 @@ def log_filename_to_stats(filename, quicklook=False):
_fields = _basename.split("_")

# First field is the date/time the sonde was first received.
_date_str = _fields[0] + "Z"
_date_dt = parse(_date_str)
_date_str = _fields[0]
_date_dt = datetime.datetime(
int(_date_str[0:4]),
int(_date_str[4:6]),
int(_date_str[6:8]),
int(_date_str[9:11]),
int(_date_str[11:13]),
int(_date_str[13:15]),
tzinfo=datetime.timezone.utc
)

# Calculate age
_age_td = _now_dt - _date_dt
Expand Down

0 comments on commit cd7028b

Please sign in to comment.