1
# Copyright 2016 Canonical Ltd. This software is licensed under the
2
# GNU Affero General Public License version 3 (see the file LICENSE).
4
"""Utilities for the WebSocket connections."""
6
DATETIME_FORMAT = "%a, %d %b. %Y %H:%M:%S"
9
def dehydrate_datetime(datetime):
10
"""Convert the `datetime` to string with `DATETIME_FORMAT`."""
11
return datetime.strftime(DATETIME_FORMAT)