mirror of
https://github.com/ansible/awx.git
synced 2026-01-11 10:00:01 -03:30
fix a tz parsing bug
This commit is contained in:
parent
8c5b0cbd57
commit
5f2e1c9705
@ -119,10 +119,11 @@ class Schedule(PrimordialModel, LaunchTimeConfig):
|
||||
tzinfo = r._dtstart.tzinfo
|
||||
if tzinfo is utc:
|
||||
return 'UTC'
|
||||
fname = tzinfo._filename
|
||||
for zone in all_zones:
|
||||
if fname.endswith(zone):
|
||||
return zone
|
||||
fname = getattr(tzinfo, '_filename', None)
|
||||
if fname:
|
||||
for zone in all_zones:
|
||||
if fname.endswith(zone):
|
||||
return zone
|
||||
logger.warn('Could not detect valid zoneinfo for {}'.format(self.rrule))
|
||||
return ''
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user