Fixed bug in gam config timezone <String> to handle timezone abbreviations correctly

This commit is contained in:
Ross Scroggs
2025-10-09 17:08:44 -07:00
parent 2dafbfbcfc
commit 3ce48a95c9
2 changed files with 9 additions and 7 deletions

View File

@@ -1,3 +1,8 @@
7.25.01
Fixed bug in `gam config timezone <String>` to handle timezone abbreviations correctly;
they were incorrectly shifted to lowercase.
7.25.00 7.25.00
Removed a capabilty added in 7.24.00 that allowed reading command data from Google Docs and Sheets Removed a capabilty added in 7.24.00 that allowed reading command data from Google Docs and Sheets

View File

@@ -25,7 +25,7 @@ https://github.com/GAM-team/GAM/wiki
""" """
__author__ = 'GAM Team <google-apps-manager@googlegroups.com>' __author__ = 'GAM Team <google-apps-manager@googlegroups.com>'
__version__ = '7.25.00' __version__ = '7.25.01'
__license__ = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)' __license__ = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)'
#pylint: disable=wrong-import-position #pylint: disable=wrong-import-position
@@ -3716,12 +3716,12 @@ def SetGlobalVariables():
return stringlist return stringlist
def _getCfgTimezone(sectionName, itemName): def _getCfgTimezone(sectionName, itemName):
value = _stripStringQuotes(GM.Globals[GM.PARSER].get(sectionName, itemName).lower()) value = _stripStringQuotes(GM.Globals[GM.PARSER].get(sectionName, itemName))
if value in {'utc', 'z'}: if value.lower() in {'utc', 'z'}:
GM.Globals[GM.CONVERT_TO_LOCAL_TIME] = False GM.Globals[GM.CONVERT_TO_LOCAL_TIME] = False
return arrow.now('utc').tzinfo return arrow.now('utc').tzinfo
GM.Globals[GM.CONVERT_TO_LOCAL_TIME] = True GM.Globals[GM.CONVERT_TO_LOCAL_TIME] = True
if value == 'local': if value.lower() == 'local':
return arrow.now(value).tzinfo return arrow.now(value).tzinfo
try: try:
return arrow.now(value).tzinfo return arrow.now(value).tzinfo
@@ -4810,7 +4810,6 @@ def defaultSvcAcctScopes():
saScopes[scope['api']].append(scope['scope']) saScopes[scope['api']].append(scope['scope'])
else: else:
saScopes[scope['api']].extend(scope['scope']) saScopes[scope['api']].extend(scope['scope'])
saScopes[API.DRIVEACTIVITY].append(API.DRIVE_SCOPE)
saScopes[API.DRIVE2] = saScopes[API.DRIVE3] saScopes[API.DRIVE2] = saScopes[API.DRIVE3]
return saScopes return saScopes
@@ -12351,8 +12350,6 @@ def checkServiceAccount(users):
saScopes[scope['api']].append(scope['roscope']) saScopes[scope['api']].append(scope['roscope'])
checkScopesSet.add(scope['roscope']) checkScopesSet.add(scope['roscope'])
i += 1 i += 1
if API.DRIVEACTIVITY in saScopes and API.DRIVE3 in saScopes:
saScopes[API.DRIVEACTIVITY].append(API.DRIVE_SCOPE)
if API.DRIVE3 in saScopes: if API.DRIVE3 in saScopes:
saScopes[API.DRIVE2] = saScopes[API.DRIVE3] saScopes[API.DRIVE2] = saScopes[API.DRIVE3]
GM.Globals[GM.OAUTH2SERVICE_JSON_DATA][API.OAUTH2SA_SCOPES] = saScopes GM.Globals[GM.OAUTH2SERVICE_JSON_DATA][API.OAUTH2SA_SCOPES] = saScopes