aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-installer/anaconda/files/0055-tweak-time-setting.patch
blob: 45caccbd8d1c790186baa89c2337cbe721e56c7c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
From ef2025d840d75d0bb76fe2d4818f191d4d28234e Mon Sep 17 00:00:00 2001
From: Hongxu Jia <hongxu.jia@windriver.com>
Date: Mon, 30 Jul 2018 14:47:46 +0800
Subject: [PATCH 55/65] tweak time setting

- Unify the gui and tui with the same default timezone setting

- The tui not support NTP server setting

Upstream-Status: Inappropriate [oe specific]

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
 pyanaconda/core/constants.py               | 2 ++
 pyanaconda/ui/gui/spokes/datetime_spoke.py | 2 +-
 pyanaconda/ui/tui/spokes/time_spoke.py     | 3 +--
 3 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/pyanaconda/core/constants.py b/pyanaconda/core/constants.py
index f706fc0..cd83920 100644
--- a/pyanaconda/core/constants.py
+++ b/pyanaconda/core/constants.py
@@ -71,6 +71,8 @@ DEFAULT_KEYBOARD = "us"
 
 DRACUT_SHUTDOWN_EJECT = "/run/initramfs/usr/lib/dracut/hooks/shutdown/99anaconda-eject.sh"
 
+DEFAULT_TZ = "America/New_York"
+
 # VNC questions
 USEVNC = N_("Start VNC")
 USETEXT = N_("Use text mode")
diff --git a/pyanaconda/ui/gui/spokes/datetime_spoke.py b/pyanaconda/ui/gui/spokes/datetime_spoke.py
index ab744bd..3850992 100644
--- a/pyanaconda/ui/gui/spokes/datetime_spoke.py
+++ b/pyanaconda/ui/gui/spokes/datetime_spoke.py
@@ -64,7 +64,7 @@ SERVER_POOL = 1
 SERVER_WORKING = 2
 SERVER_USE = 3
 
-DEFAULT_TZ = "America/New_York"
+DEFAULT_TZ = constants.DEFAULT_TZ
 
 SPLIT_NUMBER_SUFFIX_RE = re.compile(r'([^0-9]*)([-+])([0-9]+)')
 
diff --git a/pyanaconda/ui/tui/spokes/time_spoke.py b/pyanaconda/ui/tui/spokes/time_spoke.py
index a05316b..593dd51 100644
--- a/pyanaconda/ui/tui/spokes/time_spoke.py
+++ b/pyanaconda/ui/tui/spokes/time_spoke.py
@@ -202,7 +202,7 @@ class TimeSpoke(FirstbootSpokeMixIn, NormalTUISpoke):
         if kickstart_timezone:
             return _("%s timezone") % kickstart_timezone
         else:
-            return _("Timezone is not set.")
+            return _("%s timezone") % constants.DEFAULT_TZ
 
     def _summary_text(self):
         """Return summary of current timezone & NTP configuration.
@@ -246,7 +246,6 @@ class TimeSpoke(FirstbootSpokeMixIn, NormalTUISpoke):
         self._container = ListColumnContainer(1, columns_width=78, spacing=1)
 
         self._container.add(TextWidget(timezone_option), callback=self._timezone_callback)
-        self._container.add(TextWidget(_("Configure NTP servers")), callback=self._configure_ntp_server_callback)
 
         self.window.add_with_separator(self._container)
 
-- 
2.7.4