-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
always create cftime datetime instances by default in num2date #136
Comments
At least from the perspective of xarray this should not be a problem; we already always use |
cf-python uses |
PR #135 merged. |
I have to complain that the way this change was implemented has been a bit annoying. To maintain compatibility between pre and post cftime 1.1 versions as we upgrade various systems I have resorted to do:
Since cftime was strict with kwargs in earlier versions, the new kwargs only_use_cftime_datetimes and only_use_python_datetimes are not accepted. At least several libraries we use break with DatetimeGregorian, including so far spacepy and matplotlib, and we're only starting to upgrade. Am I misunderstanding something here? |
Currently, a python datetime instance is returned if possible. This can be controlled by the
use_only_cftime_datetimes
kwarg, which is currentlyFalse
by default. PR #135 switches the default toTrue
to avoid surprising results such as discussed in issue #134.Will this cause problems with existing code? Is anyone relying on the current default?
The text was updated successfully, but these errors were encountered: