From f3b7c69377d76e17c5f8610f661140813204f658 Mon Sep 17 00:00:00 2001 From: pukkandan Date: Tue, 16 Feb 2021 16:54:42 +0530 Subject: [PATCH] [version] Set version number based on UTC time, not local time --- Changelog.md | 2 +- devscripts/update-version.py | 2 +- youtube_dlc/version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Changelog.md b/Changelog.md index 9ecc34fb6..cb83c387b 100644 --- a/Changelog.md +++ b/Changelog.md @@ -8,7 +8,7 @@ * Change "Merged with youtube-dl" version in Readme.md if needed * Commit to master as `Release ` * Push to origin/release - build task will now run -* Update version.py using devscripts\update-version.py (be wary of timezones) +* Update version.py using devscripts\update-version.py * Run `make issuetemplates` * Commit to master as `[version] update :ci skip all` * Push to origin/master diff --git a/devscripts/update-version.py b/devscripts/update-version.py index 38dea0862..54d2158a6 100644 --- a/devscripts/update-version.py +++ b/devscripts/update-version.py @@ -13,7 +13,7 @@ old_version_list = old_version.split(".", 4) old_ver = '.'.join(old_version_list[:3]) old_rev = old_version_list[3] if len(old_version_list) > 3 else '' -ver = datetime.now().strftime("%Y.%m.%d") +ver = datetime.utcnow().strftime("%Y.%m.%d") rev = str(int(old_rev or 0) + 1) if old_ver == ver else '' VERSION = '.'.join((ver, rev)) if rev else ver diff --git a/youtube_dlc/version.py b/youtube_dlc/version.py index 654f9ea0f..055e4cdfe 100644 --- a/youtube_dlc/version.py +++ b/youtube_dlc/version.py @@ -1,3 +1,3 @@ from __future__ import unicode_literals -__version__ = '2021.02.16' +__version__ = '2021.02.15'