Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
timestamp: Switch to a slightly faster datetime_to_timestamp.
Alex Vandiver97a5690f5588
diff --git a/zerver/lib/timestamp.py b/zerver/lib/timestamp.pyindex f636d9a5533..9098fcf6f9e 100644--- a/zerver/lib/timestamp.py+++ b/zerver/lib/timestamp.py@@ -1,4 +1,3 @@-import calendarimport datetime@@ -47,4 +46,4 @@ def timestamp_to_datetime(timestamp: float) -> datetime.datetime:def datetime_to_timestamp(dt: datetime.datetime) -> int:verify_UTC(dt)- return calendar.timegm(dt.timetuple())+ return int(dt.timestamp())