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
|
# Date Formats
|
||||||
# Checks for bug #2325
|
# Checks for bug #2325
|
||||||
assert CONFIG._dLocale.bcp47Name() == "en-GB"
|
ts = datetime.datetime.fromtimestamp(1746370775)
|
||||||
assert CONFIG.localDate(datetime.datetime.fromtimestamp(1746370775)) == "04/05/2025"
|
CONFIG._dShortDate = "dd/MM/yyyy"
|
||||||
assert CONFIG.localDateTime(datetime.datetime.fromtimestamp(1746370775)) == "04/05/2025 16:59"
|
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
|
@pytest.mark.base
|
||||||
|
|||||||
Reference in New Issue
Block a user