From 7d8cb0890871a0e43e73fa25e326fd44167cb859 Mon Sep 17 00:00:00 2001 From: Christian Hohnstaedt Date: Thu, 8 Mar 2018 21:59:18 +0100 Subject: [PATCH] GitHub Bug #4: Don't use " t" in QDateTimeEdit format string otherwise manual editing ithe sections fails and resets the edited section after leaving it. Workaround: resolve the timezone a-priori and use it statically in the format string --- widgets/validity.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/widgets/validity.cpp b/widgets/validity.cpp index da27b761..2cac00a1 100644 --- a/widgets/validity.cpp +++ b/widgets/validity.cpp @@ -105,7 +105,8 @@ void Validity::updateFormatString() if (timeSpec() == Qt::UTC || midnight) { format += " 'GMT'"; } else { - format+= " t"; + format += QString(" '%1'") + .arg(QTime::currentTime().toString("t")); } setDisplayFormat(format); }