Commit 81b425f5 authored by Ivan Tyagov's avatar Ivan Tyagov

Initial implementation of timezone support for ERP5.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@17621 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 5fcc47d2
...@@ -2494,3 +2494,13 @@ def sleep(t=5): ...@@ -2494,3 +2494,13 @@ def sleep(t=5):
Wait for a given time Wait for a given time
""" """
time.sleep(t) time.sleep(t)
#####################################################
# Timezones
#####################################################
def getCommonTimeZoneList():
""" Get common (country/capital(major cities) format) timezones list """
from pytz import common_timezones
return common_timezones
...@@ -95,7 +95,7 @@ from AccessControl.SecurityInfo import ModuleSecurityInfo ...@@ -95,7 +95,7 @@ from AccessControl.SecurityInfo import ModuleSecurityInfo
allow_module('Products.ERP5Type.Cache') allow_module('Products.ERP5Type.Cache')
ModuleSecurityInfo('Products.ERP5Type.Utils').declarePublic( ModuleSecurityInfo('Products.ERP5Type.Utils').declarePublic(
'sortValueList', 'convertToUpperCase', 'UpperCase', 'sortValueList', 'convertToUpperCase', 'UpperCase',
'convertToMixedCase', 'cartesianProduct', 'sleep') 'convertToMixedCase', 'cartesianProduct', 'sleep', 'getCommonTimeZoneList')
allow_module('Products.ERP5Type.Message') allow_module('Products.ERP5Type.Message')
allow_module('Products.ERP5Type.Error') allow_module('Products.ERP5Type.Error')
......
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