You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
anaconda/SOURCES/0005-Set-default-timezone-t...

56 lines
2.2 KiB

From 028412d2e031a850831d0a521af49051299e1b10 Mon Sep 17 00:00:00 2001
From: Sergey Cherevko <s.cherevko@msvsphere-os.ru>
Date: Thu, 19 Dec 2024 21:24:09 +0300
Subject: [PATCH 05/15] Set default timezone to Europe/Moscow
---
pyanaconda/modules/timezone/installation.py | 4 ++--
pyanaconda/modules/timezone/timezone.py | 2 +-
pyanaconda/ui/gui/spokes/datetime_spoke.py | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/pyanaconda/modules/timezone/installation.py b/pyanaconda/modules/timezone/installation.py
index 0cd7510..024a881 100644
--- a/pyanaconda/modules/timezone/installation.py
+++ b/pyanaconda/modules/timezone/installation.py
@@ -96,8 +96,8 @@ class ConfigureTimezoneTask(Task):
if not is_valid_timezone(self._timezone):
# this should never happen, but for pity's sake
log.warning("Timezone %s set in kickstart is not valid, "
- "falling back to default (America/New_York).", self._timezone)
- self._timezone = "America/New_York"
+ "falling back to default (Europe/Moscow).", self._timezone)
+ self._timezone = "Europe/Moscow"
def _make_timezone_symlink(self):
"""Create the symlink that actually defines timezone."""
diff --git a/pyanaconda/modules/timezone/timezone.py b/pyanaconda/modules/timezone/timezone.py
index 1640d9f..40fe8ea 100644
--- a/pyanaconda/modules/timezone/timezone.py
+++ b/pyanaconda/modules/timezone/timezone.py
@@ -51,7 +51,7 @@ class TimezoneService(KickstartService):
def __init__(self):
super().__init__()
self.timezone_changed = Signal()
- self._timezone = "America/New_York"
+ self._timezone = "Europe/Moscow"
self._priority = TIMEZONE_PRIORITY_DEFAULT
self.geolocation_result_changed = Signal()
diff --git a/pyanaconda/ui/gui/spokes/datetime_spoke.py b/pyanaconda/ui/gui/spokes/datetime_spoke.py
index c379b39..dea5af7 100644
--- a/pyanaconda/ui/gui/spokes/datetime_spoke.py
+++ b/pyanaconda/ui/gui/spokes/datetime_spoke.py
@@ -57,7 +57,7 @@ log = get_module_logger(__name__)
__all__ = ["DatetimeSpoke"]
-DEFAULT_TZ = "America/New_York"
+DEFAULT_TZ = "Europe/Moscow"
SPLIT_NUMBER_SUFFIX_RE = re.compile(r'([^0-9]*)([-+])([0-9]+)')
--
2.43.5