Commit 659ec848 authored by Sylvain Thénault's avatar Sylvain Thénault
Browse files

hidden usage of datetime function which has been moved to lgc

parent 6ca684648518
......@@ -13,13 +13,14 @@ from warnings import warn
from datetime import datetime
from logilab.mtconverter import xml_escape
from logilab.common.date import ustrftime
from logilab.common.decorators import cached
from yams.schema import KNOWN_METAATTRIBUTES
from yams.constraints import (SizeConstraint, StaticVocabularyConstraint,
FormatConstraint)
from cubicweb import Binary, tags, uilib, utils
from cubicweb import Binary, tags, uilib
from cubicweb.web import INTERNAL_FIELD_VALUE, ProcessFormError, eid_param, \
formwidgets as fw
......@@ -670,7 +671,7 @@ class DateField(StringField):
def format_single_value(self, req, value):
if value:
return utils.ustrftime(value, req.property_value(self.format_prop))
return ustrftime(value, req.property_value(self.format_prop))
return u''
def render_example(self, req):
......
......@@ -12,8 +12,9 @@ from warnings import warn
from logilab.mtconverter import xml_escape
from logilab.common.deprecation import deprecated
from logilab.common.date import todatetime
from cubicweb import tags, uilib, utils
from cubicweb import tags, uilib
from cubicweb.web import stdmsgs, INTERNAL_FIELD_VALUE, ProcessFormError
class FieldWidget(object):
......@@ -508,7 +509,7 @@ class JQueryDateTimePicker(FieldWidget):
timestr = req.form.get(field.input_name(form, 'time')).strip() or None
if datestr is None:
return None
date = utils.todatetime(req.parse_datetime(datestr, 'Date'))
date = todatetime(req.parse_datetime(datestr, 'Date'))
if timestr is None:
return date
time = req.parse_datetime(timestr, 'Time')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment