Skip to content

Commit

Permalink
Cast to UTC epoch seconds explicitly
Browse files Browse the repository at this point in the history
  • Loading branch information
ethho committed Oct 3, 2024
1 parent 6876acb commit 35466a6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pharus/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,9 @@ def _fetch_records(
r"timestamp", attribute_info.type
):
# Datetime or timestamp, use timestamp to covert to epoch time
row.append(non_blobs_row[attribute_name].timestamp())
row.append(non_blobs_row[attribute_name].replace(
tzinfo=datetime.timezone.utc
).timestamp())
elif attribute_info.type[0:7] == "decimal":
# Covert decimal to string
row.append(str(non_blobs_row[attribute_name]))
Expand Down

0 comments on commit 35466a6

Please sign in to comment.