Bug 336738 - time zone is miscalculated by 1 hour or ignored
Summary: time zone is miscalculated by 1 hour or ignored
Status: CLOSED FIXED
Alias: None
Product: kalarm
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Fedora RPMs Linux
: NOR major
Target Milestone: ---
Assignee: David Jarvie
URL:
Keywords:
: 361115 362283 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-06-26 06:31 UTC by Leon
Modified: 2020-08-17 23:37 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 16.04
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Leon 2014-06-26 06:31:25 UTC
When time zone is active, kalarm still calculates time zone difference by 1 hour. The time reached is also then not honoured except for the actual time zone:



Reproducible: Always

Steps to Reproduce:
1. Set time for a few minutes ahead of current time eg. 8.25am (Kalarm would notify time already past). To remedy, adjust time 1 hour ahead. The alamr times now match on the display
2. 
3.
Actual Results:  
The alarm does not sound at the displayed time. It uses the timezone time with the incorrect offset time out by 1 hour

Expected Results:  
displayed time and machine time should perform the alarm action
Comment 1 David Jarvie 2014-06-26 17:41:21 UTC
Can you please clarify how to reproduce this.

- when you say "set time", do you mean to set the *system* time?

- what alarm should be set up to test this?

- what time zone are you using?
Comment 2 Christoph Feck 2014-07-21 14:09:39 UTC
If you can provide the information requested in comment #1, please add it.
Comment 3 Leon 2014-07-21 15:32:22 UTC
Test case:
- Set New "Audio" alarm
- Select audio file
- Set alarm time 5 minute 5 minutes in the future from your system time

When Ok is pressed, it alerts one the time is already Expired.

using Timezone Africa/Johannesburg
Comment 4 David Jarvie 2014-07-29 21:09:15 UTC
When you start KAlarm, is the following message displayed?
  Time zones are not accessible.
  KAlarm will use the UTC time zone.

If not, please check the contents of KAlarm's configuration file ~/.kde/share/config/kalarmrc. If there is an entry "tzunavailable=false" in the "[Notification Messages]" section, quit KAlarm, delete the "tzunavailable=false" line, and then run KAlarm again. Does the time zones message appear now?
Comment 5 Christoph Feck 2014-08-18 12:22:34 UTC
Leon, does comment #4 help solving the issue? Please add a comment.
Comment 6 Leon 2014-08-18 12:42:17 UTC
On Comment #4:
The App does not display any notices during startup.

These were the only entries under the Notification Section:
[Notification Messages]
AskAutoStart=
ConfirmAlarmDeletion=true
EmailQueuedNotify=false
QuitWarn=

Versin 4.13.3
Comment 7 Leon 2014-08-18 12:45:08 UTC
(In reply to Leon from comment #6)
> On Comment #4:
> The App does not display any notices during startup.
> 
> These were the only entries under the Notification Section:
> [Notification Messages]
> AskAutoStart=
> ConfirmAlarmDeletion=true
> EmailQueuedNotify=false
> QuitWarn=
> 
> Versin 4.13.3

I meant the current version I am using is 4.13.3 (it is not part of the config file)
Comment 8 David Jarvie 2014-08-24 23:15:03 UTC
In KAlarm, go to Settings -> Configure KAlarm, and select the Time & Date tab. Which time zone is shown as selected?
Comment 9 Christoph Feck 2014-09-14 11:01:11 UTC
If you can provide the information requested in comment #8, please add it.
Comment 10 Christoph Feck 2014-10-25 14:44:52 UTC
To further investigate this issue, KDE developers need the information requested in comment #8. If you can provide it, or need help with finding that information, please add a comment.
Comment 11 Leon 2014-10-26 05:44:45 UTC
Timezone =  Africa/Johannesburg
Comment 12 Christoph Feck 2014-11-16 16:22:13 UTC
Thanks for the update.
Comment 13 David Jarvie 2016-02-26 21:04:21 UTC
Please open a terminal window and type the following command, followed by <Enter>:
   timedatectl

Report what is displayed in the line beginning "Time zone:".
Comment 14 Leon 2016-02-29 06:48:53 UTC
Local time: Mon 2016-02-29 08:41:12 SAST
Universal time: Mon 2016-02-29 06:41:12 UTC
RTC time: Mon 2016-02-29 06:41:12
Time zone: Africa/Johannesburg (SAST, +0200)
Network time on: yes
NTP synchronized: yes
RTC in local TZ: no

Additional note: since upgrading to F22 from F20, various things stopped working... like the Akonadi service, so I am unable to test further and confirm if this condition has been resolved in F22/F23
Comment 15 David Jarvie 2016-04-10 12:24:32 UTC
This is due to a bug in the KDE PIM libraries (in kcalcore). See https://phabricator.kde.org/D1375.
Comment 16 David Jarvie 2016-04-10 12:25:29 UTC
*** Bug 360674 has been marked as a duplicate of this bug. ***
Comment 17 David Jarvie 2016-04-10 18:53:00 UTC
*** Bug 361115 has been marked as a duplicate of this bug. ***
Comment 18 David Jarvie 2016-04-11 19:49:45 UTC
Git commit 9800fca3b44300828a8b7d23ae962f01e47ac5ff by David Jarvie.
Committed on 11/04/2016 at 19:35.
Pushed by djarvie into branch 'Applications/16.04'.

Fix timesInInterval() when parsing VTIMEZONE RRULE components

KDateTime::isValid() (KF5 <= 5.21) wrongly returns invalid for an instance which is specified in ClockTime, if the date/time is invalid in LocalTime, resulting in timesInInterval() returning no values when parsing a VTIMEZONE RRULE component in ICalTimeZones.

This is a workaround for backwards compatibility with KF5 <= 5.21.

Differential Revision: https://phabricator.kde.org/D1375
FIXED-IN: 16.04

M +2 -1 src/recurrencerule.cpp

http://commits.kde.org/kcalcore/9800fca3b44300828a8b7d23ae962f01e47ac5ff
Comment 19 David Jarvie 2016-04-26 11:29:29 UTC
*** Bug 362283 has been marked as a duplicate of this bug. ***
Comment 20 David Jarvie 2016-05-05 22:17:25 UTC
Git commit af320ed5599cb0737c0601e26126c39e64780de0 by David Jarvie.
Committed on 05/05/2016 at 22:08.
Pushed by djarvie into branch 'master'.

Fix KDateTime::isValid() for ClockTime values

Fix KDateTime::isValid() wrongly returning invalid for an instance
which is specified in ClockTime, if the date/time is invalid in the
local time zone. Bug was due to QDateTime::isValid() working
differently in Qt4 and Qt5.

REVIEW: 127629

M  +16   -0    autotests/kdatetimetest.cpp
M  +11   -1    src/kdecore/kdatetime.cpp

http://commits.kde.org/kdelibs4support/af320ed5599cb0737c0601e26126c39e64780de0