tools (date_utils): moved date_parse to common.date_utils, because it can be used in frontends
This commit is contained in:
parent
d36f76e7d3
commit
0242772939
1 changed files with 21 additions and 17 deletions
|
|
@ -24,6 +24,7 @@ from sat.core.log import getLogger
|
|||
log = getLogger(__name__)
|
||||
from sat.tools import utils
|
||||
from sat.tools.common import uri as uri_parse
|
||||
from sat.tools.common import date_utils
|
||||
from twisted.internet import defer
|
||||
from twisted.words.protocols.jabber import jid, error
|
||||
from twisted.words.xish import domish
|
||||
|
|
@ -111,7 +112,7 @@ class Events(object):
|
|||
raise exceptions.NotFound(_(u"No event with this id has been found"))
|
||||
|
||||
try:
|
||||
timestamp = utils.date_parse(next(event_elt.elements(NS_EVENT, "date")))
|
||||
timestamp = date_utils.date_parse(next(event_elt.elements(NS_EVENT, "date")))
|
||||
except StopIteration:
|
||||
timestamp = -1
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue