You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to the docstring of the num2date function, with the option only_use_cftime_datetimes=False the function should return python datetime instances where possible:
**`only_use_cftime_datetimes`**: if False, python datetime.datetime
objects are returned from num2date where possible; if True dates which
subclass cftime.datetime are returned for all calendars. Default `True`.
However, this doesn't seem to be the case:
In [1]: from cftime import num2date,num2pydate
In [2]: num2date(0,units="seconds since 2000-01-01 00:00:00",only_use_cftime_datetimes=False)
Out[2]: cftime.DatetimeGregorian(2000-01-01 00:00:00)
In [3]: num2pydate(0,units="seconds since 2000-01-01 00:00:00")
Out[3]: datetime.datetime(2000, 1, 1, 0, 0)
cftime version 1.1.1.2
python 3.7.6
Linux 3.10.0-957.el7.x86_64
The text was updated successfully, but these errors were encountered:
According to the docstring of the num2date function, with the option
only_use_cftime_datetimes=False
the function should return python datetime instances where possible:However, this doesn't seem to be the case:
cftime version 1.1.1.2
python 3.7.6
Linux 3.10.0-957.el7.x86_64
The text was updated successfully, but these errors were encountered: