Summary: | Timezone (Local) doesn't obey DST | ||
---|---|---|---|
Product: | [Applications] kst | Reporter: | Matthew Truch <matt> |
Component: | general | Assignee: | kst |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | 1.x | ||
Target Milestone: | --- | ||
Platform: | Slackware | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Matthew Truch
2005-05-01 22:40:51 UTC
The timezone code in Kst2dplot compares localtime() to gmtime(). gmtime() gives UTC, localtime gives a time relative to the specified timezone. I guess gmtime() is computing with daylight savings and the hour is canceling out? I'm not sure yet... One thing I do know is that this code is also not threadsafe and needs to be fixed before 1.1.0 is released. SVN commit 410016 by staikos: merged portion of patch from Andrew to fix DST bug (untested by me) BUG: 104931 M +1 -0 trunk/extragear/graphics/kst/kst/kst2dplot.cpp --- trunk/extragear/graphics/kst/kst/kst2dplot.cpp #410015:410016 @@ -6757,6 +6757,7 @@ if (!gmtRc || !ltRc) { return 0.0; } + ltRc->tm_isdst = 0; return difftime(mktime(gmtRc), mktime(ltRc)) / (-60.0 * 60.0); } |