aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-installer/anaconda/files/0055-tweak-time-setting.patch
blob: 48c736991e1b0e4b5722c4df30cc799855222a0b (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 6ed8ae98a2b2263a83a2c0933772d69b53e96e70 Mon Sep 17 00:00:00 2001
From: Hongxu Jia <hongxu.jia@windriver.com>
Date: Sat, 29 Jun 2019 17:01:53 +0800
Subject: [PATCH] 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 cdf5ef6..5e3cd7b 100644
--- a/pyanaconda/core/constants.py
+++ b/pyanaconda/core/constants.py
@@ -82,6 +82,8 @@ DEFAULT_KEYBOARD = "us"
 
 DRACUT_SHUTDOWN_EJECT = "/run/initramfs/usr/lib/dracut/hooks/shutdown/99anaconda-eject.sh"
 
+DEFAULT_TZ = "America/New_York"
+
 # Help.
 HELP_DIR = "/usr/share/anaconda/help"
 HELP_MAIN_PAGE_GUI = "Installation_Guide.xml"
diff --git a/pyanaconda/ui/gui/spokes/datetime_spoke.py b/pyanaconda/ui/gui/spokes/datetime_spoke.py
index 98652cf..b312e05 100644
--- a/pyanaconda/ui/gui/spokes/datetime_spoke.py
+++ b/pyanaconda/ui/gui/spokes/datetime_spoke.py
@@ -65,7 +65,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 e232344..411186b 100644
--- a/pyanaconda/ui/tui/spokes/time_spoke.py
+++ b/pyanaconda/ui/tui/spokes/time_spoke.py
@@ -201,7 +201,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.
@@ -245,7 +245,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