| |
@@ -14,15 +14,10 @@
|
| |
|
| |
SDE = os.getenv('SOURCE_DATE_EPOCH')
|
| |
if SDE is not None:
|
| |
- obj = time.gmtime(int(SDE))
|
| |
+ gmtime_obj = time.gmtime(int(SDE))
|
| |
else:
|
| |
- obj = time.gmtime()
|
| |
+ gmtime_obj = time.gmtime()
|
| |
|
| |
- year = obj[0]
|
| |
- doy = obj[7]
|
| |
- if doy < 100:
|
| |
- doy = "0" + str(doy)
|
| |
- tod = str(obj[3]) + str(obj[4])
|
| |
- buildnum = f"{year}.{doy}.{tod}"
|
| |
-
|
| |
+ # Print build number
|
| |
+ buildnum = time.strftime("%Y.%j.%H%M", gmtime_obj)
|
| |
print(f'\\"{buildnum}\\"', end = '')
|
| |
Description: We need to zero pad the hour and minute is they are less than "10"
relates: https://pagure.io/389-ds-base/issue/50954