You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To properly convert from protobuf to datetime, one has to explicitly
handle the nanoseconds like so:
```python
# Add microseconds and add nanoseconds converted to microseconds
microseconds = int(ts.nanos / 1000)
return datetime.fromtimestamp(ts.seconds + microseconds * 1e-6,
tz=tz)
```
We implemented a convert function that does exactly this, but we have
not been using it consistently yet. This commit replaces the last
occurances.
With that in mind, this commit changes:
* Consistently use the conversion function from the common repository
Fix start_time conversion imprecision bug
* Use shorter notations to set timezones
* Raise on invalid timezone in create()
Signed-off-by: Mathias L. Baumann <[email protected]>
0 commit comments