Skip to content

Commit 5150c77

Browse files
committed
Use today's date for new files.
1 parent d19078d commit 5150c77

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tools/test/generateAllScreenshots.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
import os
1919
import re
2020
import sys
21+
import time
2122
from util import compare
2223

2324

@@ -134,6 +135,9 @@ def generateJavascriptFile():
134135
if os.path.exists(translatedFile):
135136
# Get the last modified date of the file in seconds and round to days
136137
date = os.popen("git log -1 --format=%ct -- \"" + translatedFile + "\"").read().strip()
138+
# if date is empty, use today's date
139+
if date == "":
140+
date = time.time()
137141
dateDay = int(date) // 86400
138142
dataForFile.append(dateDay)
139143
else:

0 commit comments

Comments
 (0)