UnknownTimeZoneError

This commit is contained in:
w-e-w 2022-10-24 21:13:36 +09:00 committed by AUTOMATIC1111
parent 9f79e59a95
commit 0c0028a9d3

View file

@ -344,7 +344,10 @@ class FilenameGenerator:
time_datetime = datetime.datetime.now() time_datetime = datetime.datetime.now()
time_format = args[0] if len(args) > 0 else self.default_time_format time_format = args[0] if len(args) > 0 else self.default_time_format
try:
time_zone = pytz.timezone(args[1]) if len(args) > 1 else None time_zone = pytz.timezone(args[1]) if len(args) > 1 else None
except pytz.exceptions.UnknownTimeZoneError as _:
time_zone = None
time_zone_time = time_datetime.astimezone(time_zone) time_zone_time = time_datetime.astimezone(time_zone)
try: try: