Explicitly convert date and datetime to QDate and QDateTime (#2325)
This commit is contained in:
@@ -20,6 +20,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
import datetime
|
||||
import json
|
||||
import sys
|
||||
|
||||
@@ -189,6 +190,12 @@ def testBaseConfig_Localisation(fncPath, tstPaths):
|
||||
languages = tstConf.listLanguages(tstConf.LANG_NW)
|
||||
assert languages == [("en_GB", "British English"), ("fr", "Français")]
|
||||
|
||||
# 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"
|
||||
|
||||
|
||||
@pytest.mark.base
|
||||
def testBaseConfig_Methods(fncPath):
|
||||
|
||||
Reference in New Issue
Block a user