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
|
|
@ -22,6 +22,7 @@ from sat.core import exceptions
|
|||
from sat.core.constants import Const as C
|
||||
from sat.tools import xml_tools
|
||||
from sat.tools import utils
|
||||
from sat.tools.common import date_utils
|
||||
from twisted.words.protocols.jabber import jid
|
||||
from twisted.words.protocols.jabber.xmlstream import XMPPHandler
|
||||
from twisted.internet import defer
|
||||
|
|
@ -353,7 +354,7 @@ class PubsubSchema(object):
|
|||
return widget_type, args, kwargs
|
||||
# we convert XMPP date to timestamp
|
||||
try:
|
||||
args[0] = unicode(utils.date_parse(args[0]))
|
||||
args[0] = unicode(date_utils.date_parse(args[0]))
|
||||
except Exception as e:
|
||||
log.warning(_(u"Can't parse date field: {msg}").format(msg=e))
|
||||
return widget_type, args, kwargs
|
||||
|
|
|
|||
Loading…
Reference in a new issue