Set cron timezone with default value

Closes #12056
This commit is contained in:
Cédric Krier committed 2023-04-11 00:12:33 +02:00
1 parent a826d91015
commit d49f0ce8fc
1 file changed
+5 -1
+5 -1
View File
@@ -102,9 +102,13 @@ class Cron(DeactivableMixin, ModelSQL, ModelView):
# Migration from 5.0: remove required on next_call
table_h.not_null_action('next_call', 'remove')
def get_timezone(self, name):
@classmethod
def default_timezone(cls):
return tz.SERVER.tzname(datetime.datetime.now())
def get_timezone(self, name):
return self.default_timezone()
@classmethod
def check_xml_record(cls, crons, values):
pass