Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/firebase_functions/private/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,10 @@ def nanoseconds_timestamp_conversion(time: str) -> _dt.datetime:
def is_precision_timestamp(time: str) -> bool:
"""Return a bool which indicates if the timestamp is in nanoseconds"""
# Split the string into date-time and fraction of second
_, s_fraction = time.split(".")
try:
_, s_fraction = time.split(".")
except ValueError:
return False # If there's no decimal, it's not a nanosecond timestamp.

# Split the fraction from the timezone specifier ('Z' or 'z')
s_fraction, _ = s_fraction.split(
Expand Down