Merge lp:~leonardolemos/switchboard-plug-datetime/fix-1619945 into lp:~elementary-apps/switchboard-plug-datetime/trunk

Proposed by Leonardo Lemos
Status: Merged
Approved by: Cody Garver
Approved revision: 171
Merged at revision: 171
Proposed branch: lp:~leonardolemos/switchboard-plug-datetime/fix-1619945
Merge into: lp:~elementary-apps/switchboard-plug-datetime/trunk
Diff against target: 19 lines (+3/-2)
1 file modified
src/Plug.vala (+3/-2)
To merge this branch: bzr merge lp:~leonardolemos/switchboard-plug-datetime/fix-1619945
Reviewer Review Type Date Requested Status
elementary Apps team Pending
Review via email: mp+304853@code.launchpad.net

Commit message

Use untranslated timezone string to apply timezones to the system

Description of the change

This branch uses the untranslated timezone string to apply timezones to the system, applying a valid timezone name.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/Plug.vala'
--- src/Plug.vala 2016-08-30 15:48:32 +0000
+++ src/Plug.vala 2016-09-03 18:38:42 +0000
@@ -240,12 +240,13 @@
240240
241 private void change_tz (string _tz) {241 private void change_tz (string _tz) {
242 var tz = _(_tz);242 var tz = _(_tz);
243 var english_tz = _tz;
243 var values = tz.split ("/", 2);244 var values = tz.split ("/", 2);
244 tz_continent_label.label = values[0];245 tz_continent_label.label = values[0];
245 tz_city_label.label = Parser.format_city (values[1]);246 tz_city_label.label = Parser.format_city (values[1]);
246 if (datetime1.Timezone != tz) {247 if (datetime1.Timezone != english_tz) {
247 try {248 try {
248 datetime1.set_timezone (tz, true);249 datetime1.set_timezone (english_tz, true);
249 } catch (Error e) {250 } catch (Error e) {
250 critical (e.message);251 critical (e.message);
251 }252 }

Subscribers

People subscribed via source and target branches

to all changes: