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
{{ message }}
Repository navigation
Room history latest argument does not handle timezones #53
When I do get_room_history("someid", latest=datetime.datetime.now()), I get the messages from many hours ago, as if those were the most recent.
I am in the UTC-4 timezone, and using .now() results in me getting the messages from 4 hours ago as if they were the most recent. I am guessing this is because Rocket Chat returns UTC timestamps, but .now() returns a local timestamp. It would be helpful if rocket-python did the conversion.
User Solutions
The easiest solution is to set latest like so: latest=datetime.datetime.utcnow(). If I don't want the current time I can put in other timestamps, but they should still be in UTC.
Activity