Changeset 11949 for main/waeup.kofa/branches/henrik-regista/src/waeup/ikoba/widgets/datetimewidget.py
- Timestamp:
- 13 Nov 2014, 14:40:27 (10 years ago)
- Location:
- main/waeup.kofa/branches/henrik-regista/src/waeup/ikoba
- Files:
-
- 1 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/branches/henrik-regista/src/waeup/ikoba/widgets/datetimewidget.py
r8944 r11949 26 26 from zope.formlib.interfaces import ConversionError 27 27 from zope.formlib.textwidgets import DatetimeWidget 28 from waeup. kofa.utils.helpers import to_timezone29 from waeup. kofa.interfaces import IKofaUtils28 from waeup.ikoba.utils.helpers import to_timezone 29 from waeup.ikoba.interfaces import IIkobaUtils 30 30 31 31 class _DummyUtils(object): 32 32 tzinfo = pytz.utc 33 33 34 # A fallback, if no I KofaUtils can be found34 # A fallback, if no IIkobaUtils can be found 35 35 _DUMMY_UTILS = _DummyUtils() 36 36 … … 85 85 return value 86 86 if value.tzinfo is None: 87 utils = queryUtility(I KofaUtils, default=_DUMMY_UTILS)87 utils = queryUtility(IIkobaUtils, default=_DUMMY_UTILS) 88 88 value = utils.tzinfo.localize(value) 89 89 return value.astimezone(pytz.utc)
Note: See TracChangeset for help on using the changeset viewer.