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
69
70
71
72
73
74
75
76
77
78
79
80
|
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>
Rebase for anaconda 34.
Signed-off-by: Kai Kang <kai.kang@windriver.com>
Rebase for anaconda 37.
Signed-off-by: Kai Kang <kai.kang@windriver.com>
---
pyanaconda/core/constants.py | 2 ++
pyanaconda/ui/gui/spokes/datetime_spoke.py | 2 +-
pyanaconda/ui/tui/spokes/time_spoke.py | 7 +------
3 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/pyanaconda/core/constants.py b/pyanaconda/core/constants.py
index b130f71fd9..70f677f304 100644
--- a/pyanaconda/core/constants.py
+++ b/pyanaconda/core/constants.py
@@ -76,6 +76,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 2e0bc2ec21..c92c227700 100644
--- a/pyanaconda/ui/gui/spokes/datetime_spoke.py
+++ b/pyanaconda/ui/gui/spokes/datetime_spoke.py
@@ -58,7 +58,7 @@ log = get_module_logger(__name__)
__all__ = ["DatetimeSpoke"]
-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 755ea9043a..8a31913ef5 100644
--- a/pyanaconda/ui/tui/spokes/time_spoke.py
+++ b/pyanaconda/ui/tui/spokes/time_spoke.py
@@ -125,7 +125,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.
@@ -172,11 +172,6 @@ class TimeSpoke(FirstbootSpokeMixIn, NormalTUISpoke):
callback=self._timezone_callback
)
- self._container.add(
- TextWidget(_("Configure NTP servers")),
- callback=self._configure_ntp_server_callback
- )
-
self.window.add_with_separator(self._container)
def _timezone_callback(self, data):
--
2.7.4
|