Incorrect timezone offset calculation in setDateTime() in _GXCommon.py
Current code:
d = int(dt.value.utcoffset().seconds / 60)
Should be:
d = int(dt.value.utcoffset().total_seconds() / 60)
Reason:
timedelta.seconds does not preserve the sign of the timedelta. It returns only the seconds component in the range 0...86399.
For example, for UTC-3 offset:
timedelta(seconds=-10800).seconds
returns 75600 instead of -10800.
As a result, negative UTC offsets are encoded incorrectly.
total_seconds() correctly preserves the sign of the offset.