diff sat/plugins/plugin_exp_pubsub_schema.py @ 2612:3e4e78de9cca

tools (date_utils): moved date_parse to common.date_utils, because it can be used in frontends
author Goffi <goffi@goffi.org>
date Thu, 21 Jun 2018 01:21:44 +0200
parents 5d4ac5415b40
children 56f94936df1e
line wrap: on
line diff
--- a/sat/plugins/plugin_exp_pubsub_schema.py	Thu Jun 21 01:21:44 2018 +0200
+++ b/sat/plugins/plugin_exp_pubsub_schema.py	Thu Jun 21 01:21:44 2018 +0200
@@ -22,6 +22,7 @@
 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 @@
             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