Skip to content

Commit

Permalink
FIX: Fix for tzinfo issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
zssherman committed Apr 11, 2024
1 parent 82ddc7a commit cb2ffa1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pysp2/io/read_sp2b.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ def read_sp2(file_name, debug=False, arm_convention=True):
diff_epoch_1904 = (
datetime(1970, 1, 1) - datetime(1904, 1, 1)).total_seconds()
UTCdatetime = np.array([
datetime.fromtimestamp(x - diff_epoch_1904, timezone.utc) for x in UTCtime])
datetime.fromtimestamp(
x - diff_epoch_1904, tz=timezone.utc).replace(tzinfo=None) for x in UTCtime])

DateTimeWave = (dt - datetime(1904, 1, 1)).total_seconds() + TimeWave

Expand Down

0 comments on commit cb2ffa1

Please sign in to comment.