Opened 6 years ago

Last modified 6 years ago

#7637 reopened defect

Date & Time panel not actually changing timezone

Reported by: Charlie Owned by: erikos
Priority: low Milestone: 8.2.0 (was Update.2)
Component: sugar Version: not specified
Keywords: blocks:8.2.0 joyride-2330:+ r+ Cc: Eben, joe
Blocked By: Blocking:
Deployments affected: Action Needed: finalize
Verified: no

Description

Selecting a new timezone in the new Sugar Control Panel's "Date & Time" pane doesn't actually change the timezone.

After restarting sugar, the Date & Time panel has the correct timezone highlighted, but running the 'date' command in a terminal still displays GMT. This is still the case after shutting the laptop down and restarting it.

Change History (16)

comment:1 Changed 6 years ago by joe

Charlie,

What Joyride # did you test?

Joe

comment:2 Changed 6 years ago by kimquirk

  • Priority changed from normal to high

please retest in latest joyride.

comment:3 Changed 6 years ago by kimquirk

  • Owner set to Charlie

comment:4 Changed 6 years ago by Charlie

Just tested again on joyride-2263. Still experiencing this issue.

Original test was on joyride-2200.

comment:5 Changed 6 years ago by kimquirk

  • Component changed from not assigned to control panel
  • Keywords blocks:8.2.0 added
  • Priority changed from high to blocker

comment:6 Changed 6 years ago by erikos

  • Action Needed changed from never set to code
  • Component changed from control panel to sugar

What is the component 'control panel' ? This is a sugar bug. And it did not came to my attention because the component was not assigned before :(

I know what the issue is and will fix it.

comment:7 Changed 6 years ago by erikos

  • Owner changed from Charlie to erikos

comment:8 Changed 6 years ago by mstone

  • Keywords joyride-2200:- joyride-2263:- added; date time clock timezone control panel removed

comment:9 Changed 6 years ago by erikos

diff --git a/src/main.py b/src/main.py
index 38da54e..cd6f8cc 100644
--- a/src/main.py
+++ b/src/main.py
@@ -114,7 +114,7 @@ def main():
         gtk.main()
 
     # set timezone    
-    if os.environ.has_key('TZ'):    
+    if get_profile().timezone is not None:
         os.environ['TZ'] = get_profile().timezone
 
     if os.environ.has_key("SUGAR_TP_DEBUG"):

I don't even think we need to check if the profile has the timezone member since we set it to "UTC" by default before reading the config in. But we need for sure remove the has_key('TZ') check.

comment:10 Changed 6 years ago by erikos

  • Action Needed changed from code to review
  • Keywords r? added

|TestCase|

Change the timezone in the control panel. Restart sugar. Open the terminal activity and check if the timezone is set correctly. The environment variable TZ should be set 'echo $TZ' and the command 'date' should have picked up the right timezone.

comment:11 Changed 6 years ago by tomeu

  • Keywords r+ added; r? removed

comment:12 Changed 6 years ago by erikos

  • Action Needed changed from review to package

Pushed to master and 0.82

comment:13 Changed 6 years ago by marco

  • Action Needed changed from package to test in build

comment:14 Changed 6 years ago by erikos

  • Action Needed changed from test in build to finalize
  • Keywords joyride-2330:+ added; joyride-2200:- joyride-2263:- removed
  • Resolution set to fixed
  • Status changed from new to closed

comment:15 Changed 6 years ago by garycmartin

Tested on an XO B4 build 759, working for me, fab :-)

comment:16 Changed 6 years ago by Stephan

  • Priority changed from blocker to low
  • Resolution fixed deleted
  • Status changed from closed to reopened

I have the same Problem on Build 767,
Modifiying the date/timezone in sugar control panel doesent change anithing "date" command is still displaying UTC but the time display is is actually UTC-2
Im operating Build 767, Sugar 0.82.1, Firmware Q2E18
Langugae is set to German (Germany)

I've found the following workaround

  1. from terminal become root
  2. copy your timezoneinfo from /usr/share/zoneinfo/.... to /etc/localtime
  3. sync to ntp and set hw-clock or reboot system and wait a few minutes
  4. open terminal and check date (should be the same wrong time as before)
  5. become root and check date again (should be your correct local time)
  6. now go to sugar control-panel and set the timezone to the same item as manually in step 2
  7. reboot system, user time should now be set to local time
Note: See TracTickets for help on using tickets.