Ticket #7637 (reopened defect)

Opened 6 years ago

Last modified 5 years ago

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
Action Needed: finalize Verified: no
Deployments affected: Blocked By:
Blocking:

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

Changed 6 years ago by joe

Charlie,

What Joyride # did you test?

Joe

Changed 6 years ago by kimquirk

  • priority changed from normal to high

please retest in latest joyride.

Changed 6 years ago by kimquirk

  • owner set to Charlie

Changed 6 years ago by Charlie

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

Original test was on joyride-2200.

Changed 6 years ago by kimquirk

  • keywords blocks:8.2.0 added
  • priority changed from high to blocker
  • component changed from not assigned to control panel

Changed 6 years ago by erikos

  • next_action 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.

Changed 6 years ago by erikos

  • owner changed from Charlie to erikos

Changed 6 years ago by mstone

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

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.

Changed 6 years ago by erikos

  • keywords r? added
  • next_action changed from code to review

|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.

Changed 6 years ago by tomeu

  • keywords r+ added; r? removed

Changed 6 years ago by erikos

  • next_action changed from review to package

Pushed to master and 0.82

Changed 6 years ago by marco

  • next_action changed from package to test in build

Changed 6 years ago by erikos

  • keywords joyride-2330:+ added; joyride-2200:- joyride-2263:- removed
  • status changed from new to closed
  • next_action changed from test in build to finalize
  • resolution set to fixed

Changed 6 years ago by garycmartin

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

Changed 5 years ago by Stephan

  • priority changed from blocker to low
  • status changed from closed to reopened
  • resolution deleted

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.