It seems that RustPython supports datetime().astimezone() while the implementation of this function is broken and attribute 'tm_gmtoff' is missing. See the following example.
Example.py
from datetime import datetime
datetime(3001, 1, 19, 7, 59, 59, 999999).astimezone()
Output on RustPython:
Traceback (most recent call last):
File "/home/xxm/Desktop/RustPython/example.py", line 199, in <module>
datetime(3001, 1, 19, 7, 59, 59, 999999).astimezone()
File "/home/xxm/.cargo/git/checkouts/rustpython-f8ef4d934ac33cd8/59df92d/pylib/Lib/datetime.py", line 1862, in astimezone
tz = self._local_timezone()
File "/home/xxm/.cargo/git/checkouts/rustpython-f8ef4d934ac33cd8/59df92d/pylib/Lib/datetime.py", line 1856, in _local_timezone
gmtoff = localtm.tm_gmtoff
AttributeError: 'struct_time' object has no attribute 'tm_gmtoff'
Behavior on CPython: works normally
Environment:
RustPython: v0.2.0 (https://github.com/RustPython/RustPython#59df92d7)
CPython: 3.9.0
Ubuntu 18.04
It seems that RustPython supports datetime().astimezone() while the implementation of this function is broken and attribute 'tm_gmtoff' is missing. See the following example.
Example.py
Output on RustPython:
Behavior on CPython: works normally
Environment:
RustPython: v0.2.0 (https://github.com/RustPython/RustPython#59df92d7)
CPython: 3.9.0
Ubuntu 18.04