From 81b425f5cbacbe2f34f4a0cef8a70540ca319d51 Mon Sep 17 00:00:00 2001 From: Ivan Tyagov <ivan@nexedi.com> Date: Thu, 15 Nov 2007 11:38:38 +0000 Subject: [PATCH] Initial implementation of timezone support for ERP5. git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@17621 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5Type/Utils.py | 10 ++++++++++ product/ERP5Type/__init__.py | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/product/ERP5Type/Utils.py b/product/ERP5Type/Utils.py index ef99b0fc29..e42bd363c3 100644 --- a/product/ERP5Type/Utils.py +++ b/product/ERP5Type/Utils.py @@ -2494,3 +2494,13 @@ def sleep(t=5): Wait for a given time """ time.sleep(t) + + +##################################################### +# Timezones +##################################################### + +def getCommonTimeZoneList(): + """ Get common (country/capital(major cities) format) timezones list """ + from pytz import common_timezones + return common_timezones diff --git a/product/ERP5Type/__init__.py b/product/ERP5Type/__init__.py index 34e95b42c4..3dd7845878 100644 --- a/product/ERP5Type/__init__.py +++ b/product/ERP5Type/__init__.py @@ -95,7 +95,7 @@ from AccessControl.SecurityInfo import ModuleSecurityInfo allow_module('Products.ERP5Type.Cache') ModuleSecurityInfo('Products.ERP5Type.Utils').declarePublic( 'sortValueList', 'convertToUpperCase', 'UpperCase', - 'convertToMixedCase', 'cartesianProduct', 'sleep') + 'convertToMixedCase', 'cartesianProduct', 'sleep', 'getCommonTimeZoneList') allow_module('Products.ERP5Type.Message') allow_module('Products.ERP5Type.Error') -- 2.30.9