--- a/src/pyams_utils/timezone/utility.py Thu Mar 08 09:13:06 2018 +0100
+++ b/src/pyams_utils/timezone/utility.py Sat Mar 10 01:58:45 2018 +0100
@@ -18,14 +18,12 @@
# import interfaces
from pyams_utils.interfaces.site import ISiteGenerations
from pyams_utils.interfaces.timezone import IServerTimezone
-from zope.site.interfaces import INewLocalSite
# import packages
from persistent import Persistent
from pyams_utils.property import DocFieldProperty
from pyams_utils.registry import utility_config
from pyams_utils.site import check_required_utilities
-from pyramid.events import subscriber
from zope.container.contained import Contained
from zope.interface import implementer
@@ -39,17 +37,11 @@
REQUIRED_UTILITIES = ((IServerTimezone, '', ServerTimezoneUtility, 'Server timezone'),)
-@subscriber(INewLocalSite)
-def handle_new_local_site(event):
- """Create a new ServerTimezoneUtility when a site is created"""
- site = event.manager.__parent__
- check_required_utilities(site, REQUIRED_UTILITIES)
-
-
@utility_config(name='PyAMS timezone', provides=ISiteGenerations)
class TimezoneGenerationsChecker(object):
"""Timezone generations checker"""
+ order = 10
generation = 1
def evolve(self, site, current=None):