Bug 381704

Summary: Astrocalculator, Day Duration module, Day length in wrong format
Product: [Applications] kstars Reporter: H.P. Bigger <hp.bigger>
Component: generalAssignee: Jasem Mutlaq <mutlaqja>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 17.08
Sentry Crash Report:
Attachments: Calculator - KStars

Description H.P. Bigger 2017-06-27 01:13:52 UTC
Created attachment 106325 [details]
Calculator - KStars

Astrocalculator, Day Duration module, Day length in wrong format:

Instead of format "h:m:s AP t" should be in format "hh:mm:ss"

Eg. https://docs.kde.org/trunk5/en/kdeedu/kstars/tool-calculator.html#calc-dayduration
Day length: 3:25:06 PM EEST (point in time)
should be
Day length: 15:25:06 (duration / timespan)


Probable cause:
modcalcdaylength.cpp, line 147:  daylengthString = QLocale().toString(daylength);


Possible fix:

daylengthString = daylength.toString("hh:mm:ss");
or
daylengthString = daylength.toString(Qt::ISODate);
Comment 1 Jasem Mutlaq 2017-07-03 08:59:55 UTC
Git commit a275e0cd0f8fcfa1dfbf16b839edc18dfe74ce4e by Jasem Mutlaq.
Committed on 03/07/2017 at 08:59.
Pushed by mutlaqja into branch 'master'.

Fix day duration format.
FIXED-IN:17.08

M  +2    -1    kstars/tools/modcalcdaylength.cpp

https://commits.kde.org/kstars/a275e0cd0f8fcfa1dfbf16b839edc18dfe74ce4e