Use QLocale to format datetime instead of Python's locale and time module