mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2024-06-07 21:20:49 +00:00
default_time_format if format is blank
This commit is contained in:
parent
146856f66d
commit
757264c453
@ -343,7 +343,7 @@ class FilenameGenerator:
|
|||||||
def datetime(self, *args):
|
def datetime(self, *args):
|
||||||
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 and args[0] != "" else self.default_time_format
|
||||||
try:
|
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 _:
|
except pytz.exceptions.UnknownTimeZoneError as _:
|
||||||
|
Loading…
Reference in New Issue
Block a user