Changeset 8195
- Timestamp:
- 17 Apr 2012, 11:57:49 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/browser/layout.py
r8106 r8195 33 33 from zope.interface import Interface 34 34 from zope.site.hooks import getSite 35 from waeup.kofa.interfaces import IKofaObject, IUserAccount 35 from waeup.kofa.interfaces import IKofaObject, IUserAccount, IKofaUtils 36 from waeup.kofa.utils.helpers import to_timezone 36 37 from waeup.kofa.browser.interfaces import ITheme 37 38 from waeup.kofa.browser.theming import get_all_themes, KofaThemeBase … … 289 290 def formatDatetime(self,datetimeobj): 290 291 if isinstance(datetimeobj, datetime): 291 return datetimeobj.strftime("%Y-%m-%d %H:%M:%S") 292 tz = getUtility(IKofaUtils).tzinfo 293 timestamp = to_timezone( 294 datetimeobj, tz).strftime("%Y-%m-%d %H:%M:%S") 295 return timestamp 292 296 else: 293 297 return None
Note: See TracChangeset for help on using the changeset viewer.