Bug 370149 - Digital and Analog Clock display wrong local time (wrong timezone?)
Summary: Digital and Analog Clock display wrong local time (wrong timezone?)
Status: RESOLVED UPSTREAM
Alias: None
Product: plasmashell
Classification: Plasma
Component: Digital Clock (show other bugs)
Version: 5.8.0
Platform: Neon Linux
: NOR major
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
: 370408 370989 371198 371401 371512 373709 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-10-05 18:46 UTC by Igor Tarasov
Modified: 2017-01-23 08:32 UTC (History)
11 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Digital (-6 hours) and analog (-3 hours) clock (75.47 KB, image/png)
2016-10-09 16:54 UTC, vic
Details
Fix digital clock offset (889 bytes, patch)
2016-10-09 21:59 UTC, vic
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Igor Tarasov 2016-10-05 18:46:22 UTC
My time is Europe/Samara. It is UTC +04:00. It is all correctly displayed in system's date command, in timedatectl, in Date and Tyme in System Settings, everywhere, but widgets.

Analog clock shows UTC time, Digital Clock shows UTC-04:00. When I choose another UTC +04:00 timezone (Tbilisi or Yerevan), the result is the same as with Europe/Samara. Dubai, Muscat, Mahe and Maurikius timezones are ok.

Reproducible: Always

Steps to Reproduce:
1. Set local timezone to Samara or Tbilisi or Yerevan.
2. Add analog clock widget and/or digital clock widget with local (system) timezone.
3. See the time

Actual Results:  
Times are UTC-4 for digital and UTC for analog clock

Expected Results:  
UTC+4

$ timedatectl
      Local time: Wed 2016-10-05 22:44:07 +04
  Universal time: Wed 2016-10-05 18:44:07 UTC
        RTC time: Wed 2016-10-05 18:44:07
       Time zone: Europe/Samara (+04, +0400)
 Network time on: yes
NTP synchronized: yes
 RTC in local TZ: no

$ date
Wed Oct  5 22:44:11 +04 2016

$ cat ~/.kde/share/config/ktimezonedrc
[TimeZones]
LocalZone=Europe/Samara
ZoneinfoDir=/usr/share/zoneinfo
Zonetab=/usr/share/zoneinfo/zone.tab
ZonetabCache=
Comment 1 vic 2016-10-09 16:51:08 UTC
I have the same issue. My timezone is Europe/Minsk +03.
Analog clock shows UTC time (-3 hours). Digital clock shows time in timezone -03 (-6 hours).
Comment 2 vic 2016-10-09 16:54:46 UTC
Created attachment 101495 [details]
Digital (-6 hours) and analog (-3 hours) clock
Comment 3 vic 2016-10-09 21:59:15 UTC
Created attachment 101498 [details]
Fix digital clock offset
Comment 4 bil 2016-10-12 10:45:26 UTC
KDE Plasma 5.6.5
KDE Frameworks 5.23.0
Qt 5.5.1


h@le5530:~$ date
Ср окт 12 15:23:40 +05 2016

h@le5530:~$ cat ~/.kde/share/config/ktimezonedrc
[TimeZones]
LocalZone=Asia/Yekaterinburg
ZoneinfoDir=/usr/share/zoneinfo
Zonetab=/usr/share/zoneinfo/zone.tab
ZonetabCache=

h@le5530:~$ timedatectl
      Local time: Ср 2016-10-12 15:24:33 +05
  Universal time: Ср 2016-10-12 10:24:33 UTC
        RTC time: Ср 2016-10-12 10:24:33                                                                                                                                 
       Time zone: Asia/Yekaterinburg (+05, +0500)                                                                                                                        
 Network time on: yes                                                                                                                                                    
NTP synchronized: yes                                                                                                                                                    
 RTC in local TZ: no


digital clock show  5:24  
- 10 hours, because timezone +5 

patch of VIC fixed time in digital clock panel, but not fixed in hover box, if selected more than one timezone
Comment 5 David Edmundson 2016-10-12 14:26:28 UTC
Urgh, yeah - your patch is right. It just needs to be in Tooltip.qml too
Comment 6 vic 2016-10-12 15:34:53 UTC
Bug also in DataEngine "time" / DataSource "Local" / key "Offset" is always 0 (Zero).
Comment 7 David Edmundson 2016-10-12 16:06:58 UTC
Edit:
Your patch isn't universally right - it's making mine (which was previously correct) off.


I'll try and look into it, and ideally just move all this logic out of the JS space
Comment 8 vic 2016-10-12 19:59:17 UTC
(In reply to vic from comment #6)
> Bug also in DataEngine "time" / DataSource "Local" / key "Offset" is always
> 0 (Zero).

https://bugreports.qt.io/browse/QTBUG-53071
"QTimeZone mishandles tzdata 2016b and later in Russia, Kazakhstan"
Comment 9 David Edmundson 2016-10-13 10:30:29 UTC
So with that, is everything fine?
Comment 10 vic 2016-10-13 16:11:53 UTC
Bug only in Qt.
My patch is a temporary workaround for numeric timezones as Europe/Minsk, Europe/Samara, Asia/Yekaterinburg and etc.
Close it!
Comment 11 emoziko 2016-10-14 10:57:50 UTC
I have exactly the same situation on my Fedora 24. Timezone is Asia/Tbilisi.
Comment 12 David Edmundson 2016-10-20 22:38:54 UTC
Fix is in Qt 5.6.2, 5.7.1 

If you still have the problem after upgrading to those Qt versions please reopen this bug.
Comment 13 David Edmundson 2016-10-20 22:39:11 UTC
*** Bug 371198 has been marked as a duplicate of this bug. ***
Comment 14 David Edmundson 2016-10-20 22:39:21 UTC
*** Bug 370408 has been marked as a duplicate of this bug. ***
Comment 15 David Edmundson 2016-10-20 22:39:44 UTC
*** Bug 370989 has been marked as a duplicate of this bug. ***
Comment 16 David Edmundson 2016-10-21 10:43:16 UTC
*** Bug 371401 has been marked as a duplicate of this bug. ***
Comment 17 David Edmundson 2016-10-24 09:33:03 UTC
*** Bug 371512 has been marked as a duplicate of this bug. ***
Comment 18 gokhangndz 2016-12-26 14:17:57 UTC
*** Bug 373709 has been marked as a duplicate of this bug. ***
Comment 19 Alexandr Zamaraev (aka Tonal) 2017-01-23 08:32:15 UTC
When Qt version upgraded to 5.7.1 to the Neon/user?