tools: renamed module sat.tools.datetime to date.tools.xmpp_datetime to avoid conflict with Python's standard lib
This commit is contained in:
parent
ed3660c4a7
commit
672174fb23
1 changed files with 13 additions and 10 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Reference in a new issue