tools: renamed module sat.tools.datetime to date.tools.xmpp_datetime to avoid conflict with Python's standard lib

This commit is contained in:
Goffi 2022-08-31 13:18:56 +02:00
commit 672174fb23

View file

@ -34,7 +34,7 @@ from twisted.python import procutils, failure
from twisted.internet import defer
from sat.core.constants import Const as C
from sat.core.log import getLogger
from sat.tools.datetime import format_date, format_datetime
from sat.tools import xmpp_datetime
log = getLogger(__name__)
@ -157,7 +157,10 @@ def xmpp_date(
datetime.timezone.utc
)
return format_datetime(dtime) if with_time else format_date(dtime.date())
return (
xmpp_datetime.format_datetime(dtime) if with_time
else xmpp_datetime.format_date(dtime.date())
)
def generatePassword(vocabulary=None, size=20):