The result of local time minus global time might be negative.
On QNX time_t is defined as unsigned int and thus the subtraction
will not produce the expected result.
This patch converts the local time and the global time
to double before subtracting them.
Task-number: QTBUG-35693
Change-Id: Ifa442b242a4aa23c59fa427015346150b89c9343
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
time_t locl = mktime(&t);
gmtime_r(&curr, &t);
time_t globl = mktime(&t);
- return double(locl - globl) * 1000.0;
+ return (double(locl) - double(globl)) * 1000.0;
#else
TIME_ZONE_INFORMATION tzInfo;
GetTimeZoneInformation(&tzInfo);