aboutsummaryrefslogtreecommitdiffstats
path: root/common_gdal.py
diff options
context:
space:
mode:
Diffstat (limited to 'common_gdal.py')
-rw-r--r--common_gdal.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/common_gdal.py b/common_gdal.py
index aa451ae..17ed1bc 100644
--- a/common_gdal.py
+++ b/common_gdal.py
@@ -159,10 +159,10 @@ def formatTZFlag(tzFlag : int) -> str:
if tzFlag == ogr.TZFLAG_UTC:
return 'UTC'
- tzOffset = abs(tzFlag - 100) * 15
+ tzOffset = abs(tzFlag - ogr.TZFLAG_UTC) * 15
tzHour = int(tzOffset / 60)
tzMinute = int(tzOffset % 60)
- tzSign = '+' if tzFlag > 100 else '-'
+ tzSign = '+' if tzFlag > ogr.TZFLAG_UTC else '-'
return f'{tzSign}{tzHour:02}{tzMinute:02}'
def fromGeomTypeName(name : str) -> int:
@@ -346,7 +346,7 @@ def parseTimeZone(tz : str) -> int:
raise BadConfiguration(f'Invalid timezone "{tz}"')
tzFlag = tzHour*4 + int(tzMinute/15)
if tzSign == '-':
- tzFlag = 100 - tzFlag
+ tzFlag = ogr.TZFLAG_UTC - tzFlag
else:
- tzFlag += 100
+ tzFlag += ogr.TZFLAG_UTC
return tzFlag