We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f657c3a commit 8a7b8f8Copy full SHA for 8a7b8f8
arho_feature_template/plugin.py
@@ -1,5 +1,6 @@
1
from __future__ import annotations
2
3
+import os
4
from typing import TYPE_CHECKING, Callable
5
6
from qgis.core import QgsApplication
@@ -42,6 +43,17 @@ def __init__(self) -> None:
42
43
44
self.toolbar = iface.addToolBar("ARHO Toolbar")
45
self.toolbar.setToolButtonStyle(Qt.ToolButtonTextBesideIcon)
46
+ self.check_timezone_variable()
47
+
48
+ def check_timezone_variable(self):
49
+ """Check if PGTZ environment variable is correctly set."""
50
51
+ if os.environ.get("PGTZ") != "Europe/Helsinki":
52
+ iface.messageBar().pushWarning(
53
+ "Varoitus",
54
+ "Ympäristömuuttuja PGTZ ei ole asetettu arvoon 'Europe/Helsinki'.\n"
55
+ "Tämä voi johtaa väärään aikavyöhykkeeseen tallennettuihin kellonaikoihin.",
56
+ )
57
58
def add_action(
59
self,
0 commit comments