We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 51362fb commit f463ed1Copy full SHA for f463ed1
src/firebase_functions/private/util.py
@@ -340,7 +340,10 @@ def nanoseconds_timestamp_conversion(time: str) -> _dt.datetime:
340
def is_precision_timestamp(time: str) -> bool:
341
"""Return a bool which indicates if the timestamp is in nanoseconds"""
342
# Split the string into date-time and fraction of second
343
- _, s_fraction = time.split(".")
+ try:
344
+ _, s_fraction = time.split(".")
345
+ except ValueError:
346
+ return False # If there's no decimal, it's not a nanosecond timestamp.
347
348
# Split the fraction from the timezone specifier ('Z' or 'z')
349
s_fraction, _ = s_fraction.split(
0 commit comments