Skip to content

Commit

Permalink
ib-create-tag: fix searching for last commit to include
Browse files Browse the repository at this point in the history
  • Loading branch information
iarspider committed Sep 4, 2024
1 parent c42cf74 commit dbdf277
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions ib-create-tag.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from __future__ import print_function
import datetime
import time
from _py2with3compatibility import HTTPError
from os.path import dirname, abspath
from socket import setdefaulttimeout
Expand All @@ -31,6 +32,13 @@
SCRIPT_DIR = dirname(abspath(sys.argv[0]))
def currenttz():
if time.daylight:
return datetime.timezone(datetime.timedelta(seconds=-time.altzone), time.tzname[1])
else:
return datetime.timezone(datetime.timedelta(seconds=-time.timezone), time.tzname[0])
if __name__ == "__main__":
from optparse import OptionParser
Expand Down Expand Up @@ -64,8 +72,12 @@
opts, args = parser.parse_args()
RELEASE_NAME = opts.release_name # "CMSSW_13_0_X_2023-02-02-1100"
ib_date = datetime.datetime.strptime(
"%s %s:%s" % (opts.date, opts.hour, opts.minute), "%Y-%m-%d %H:%M"
ib_date = (
datetime.datetime.strptime(
"%s %s:%s" % (opts.date, opts.hour, opts.minute), "%Y-%m-%d %H:%M"
)
.replace(tzinfo=currenttz())
.astimezone(datetime.timezone.utc)
)
RELEASE_BRANCH = opts.branch # "master"
Expand Down

0 comments on commit dbdf277

Please sign in to comment.