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
1=== modified file 'src/Plug.vala'
2--- src/Plug.vala 2016-08-30 15:48:32 +0000
3+++ src/Plug.vala 2016-09-03 18:38:42 +0000
4@@ -240,12 +240,13 @@
5
6 private void change_tz (string _tz) {
7 var tz = _(_tz);
8+ var english_tz = _tz;
9 var values = tz.split ("/", 2);
10 tz_continent_label.label = values[0];
11 tz_city_label.label = Parser.format_city (values[1]);
12- if (datetime1.Timezone != tz) {
13+ if (datetime1.Timezone != english_tz) {
14 try {
15- datetime1.set_timezone (tz, true);
16+ datetime1.set_timezone (english_tz, true);
17 } catch (Error e) {
18 critical (e.message);
19 }

Subscribers

People subscribed via source and target branches

to all changes: