Lock the date and time format in the config test, and make it time zone ignorant
This commit is contained in:
@@ -192,9 +192,11 @@ def testBaseConfig_Localisation(fncPath, tstPaths):
|
||||
|
||||
# Date Formats
|
||||
# Checks for bug #2325
|
||||
assert CONFIG._dLocale.bcp47Name() == "en-GB"
|
||||
assert CONFIG.localDate(datetime.datetime.fromtimestamp(1746370775)) == "04/05/2025"
|
||||
assert CONFIG.localDateTime(datetime.datetime.fromtimestamp(1746370775)) == "04/05/2025 16:59"
|
||||
ts = datetime.datetime.fromtimestamp(1746370775)
|
||||
CONFIG._dShortDate = "dd/MM/yyyy"
|
||||
CONFIG._dShortDateTime = "dd/MM/yyyy HH:mm"
|
||||
assert CONFIG.localDate(ts) == ts.strftime("%d/%m/%Y")
|
||||
assert CONFIG.localDateTime(ts) == ts.strftime("%d/%m/%Y %H:%M")
|
||||
|
||||
|
||||
@pytest.mark.base
|
||||
|
||||
Reference in New Issue
Block a user