File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change 1
1
from __future__ import annotations
2
2
3
+ import os
3
4
from typing import TYPE_CHECKING , Callable
4
5
5
6
from qgis .core import QgsApplication
@@ -42,6 +43,17 @@ def __init__(self) -> None:
42
43
43
44
self .toolbar = iface .addToolBar ("ARHO Toolbar" )
44
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
+ )
45
57
46
58
def add_action (
47
59
self ,
You can’t perform that action at this time.
0 commit comments