mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-02-14 17:42:58 +08:00
Merge pull request #13281 from AUTOMATIC1111/Config-states-time-ISO-in-system-time-zone
Config states time ISO in system time zone
This commit is contained in:
commit
7ce1f3a142
@ -4,7 +4,6 @@ Supports saving and restoring webui and extensions from a known working set of c
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
import json
|
import json
|
||||||
import time
|
|
||||||
import tqdm
|
import tqdm
|
||||||
|
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
@ -38,7 +37,7 @@ def list_config_states():
|
|||||||
config_states = sorted(config_states, key=lambda cs: cs["created_at"], reverse=True)
|
config_states = sorted(config_states, key=lambda cs: cs["created_at"], reverse=True)
|
||||||
|
|
||||||
for cs in config_states:
|
for cs in config_states:
|
||||||
timestamp = time.asctime(time.gmtime(cs["created_at"]))
|
timestamp = datetime.fromtimestamp(cs["created_at"]).strftime('%Y-%m-%d %H:%M:%S')
|
||||||
name = cs.get("name", "Config")
|
name = cs.get("name", "Config")
|
||||||
full_name = f"{name}: {timestamp}"
|
full_name = f"{name}: {timestamp}"
|
||||||
all_config_states[full_name] = cs
|
all_config_states[full_name] = cs
|
||||||
|
@ -197,7 +197,7 @@ def update_config_states_table(state_name):
|
|||||||
config_state = config_states.all_config_states[state_name]
|
config_state = config_states.all_config_states[state_name]
|
||||||
|
|
||||||
config_name = config_state.get("name", "Config")
|
config_name = config_state.get("name", "Config")
|
||||||
created_date = time.asctime(time.gmtime(config_state["created_at"]))
|
created_date = datetime.fromtimestamp(config_state["created_at"]).strftime('%Y-%m-%d %H:%M:%S')
|
||||||
filepath = config_state.get("filepath", "<unknown>")
|
filepath = config_state.get("filepath", "<unknown>")
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user