Skip to content

Commit

Permalink
Merge pull request #12865 from AUTOMATIC1111/another-convert-to-syste…
Browse files Browse the repository at this point in the history
…m-time-zone

extension update time, convert to system time zone
  • Loading branch information
AUTOMATIC1111 committed Aug 30, 2023
1 parent 87a083d commit 1ac11b3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/ui_extensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import os
import threading
import time
from datetime import datetime
from datetime import datetime, timezone

import git

Expand Down Expand Up @@ -442,7 +442,7 @@ def search_extensions(filter_text, hide_tags, sort_column):

def get_date(info: dict, key):
try:
return datetime.strptime(info.get(key), "%Y-%m-%dT%H:%M:%SZ").strftime("%Y-%m-%d")
return datetime.strptime(info.get(key), "%Y-%m-%dT%H:%M:%SZ").replace(tzinfo=timezone.utc).astimezone().strftime("%Y-%m-%d")
except (ValueError, TypeError):
return ''

Expand Down

0 comments on commit 1ac11b3

Please sign in to comment.