Skip to content

Commit

Permalink
UTC timzone for all
Browse files Browse the repository at this point in the history
  • Loading branch information
yzqzss committed Dec 4, 2023
1 parent 862856c commit 9c8ffb7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion dokuWikiDumper/dump/dokuDumper.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ def dump():

base_url = buildBaseUrl(doku_url)
dumpDir = url2prefix(doku_url) + '-' + \
time.strftime("%Y%m%d") if not args.path else args.path.rstrip('/')
time.strftime("%Y%m%d", time.gmtime()) if not args.path else args.path.rstrip('/')
if args.no_resume:
if os.path.exists(dumpDir):
print(
Expand Down
8 changes: 4 additions & 4 deletions dokuWikiUploader/uploader.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def upload(args: dict):
"collection": collection,
"title": "Wiki - " + wikiname,
"description": description_without_URL, # without URL, to bypass IA's anti-spam.
"last-updated-date": time.strftime("%Y-%m-%d"),
"last-updated-date": time.strftime("%Y-%m-%d", time.gmtime()),
"subject": "; ".join(
keywords_init
), # Keywords should be separated by ; but it doesn't matter much; the alternative is to set one per field with subject[0], subject[1], ...
Expand Down Expand Up @@ -213,9 +213,9 @@ def upload(args: dict):
print(" (add URL back: %s )..." % info.get(INFO_DOKU_URL))
new_md.update({"description": description_with_URL})

if item.metadata.get("last-updated-date") != time.strftime("%Y-%m-%d"):
print(" (update last-updated-date to %s )..." % time.strftime("%Y-%m-%d"))
new_md.update({"last-updated-date": time.strftime("%Y-%m-%d")})
if item.metadata.get("last-updated-date") != time.strftime("%Y-%m-%d", time.gmtime()):
print(" (update last-updated-date to %s )..." % time.strftime("%Y-%m-%d", time.gmtime()))
new_md.update({"last-updated-date": time.strftime("%Y-%m-%d", time.gmtime())})

_subject_full = "; ".join(keywords_full)
_subject_without_wikiname = "; ".join(keywords_init + [url2prefix(info.get(INFO_DOKU_URL), ascii_slugify=False)])
Expand Down

0 comments on commit 9c8ffb7

Please sign in to comment.