-
Notifications
You must be signed in to change notification settings - Fork 54
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
update usage of isodatetime methods #2579
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I spotted another needed fix:
diff --git a/metomi/rose/date.py b/metomi/rose/date.py
index dd4511c3..de9cf31c 100644
--- a/metomi/rose/date.py
+++ b/metomi/rose/date.py
@@ -302,8 +302,7 @@ class RoseDateTimeOperator:
@classmethod
def get_datetime_strftime(cls, time_point, print_format):
"""Use the datetime library's strftime as a fallback."""
- calendar_date = time_point.copy().to_calendar_date()
- year, month, day = calendar_date.get_calendar_date()
+ year, month, day = time_point.get_calendar_date()
hour, minute, second = time_point.get_hour_minute_second()
microsecond = int(1.0e6 * (second - int(second)))
hour = int(hour)
Also, I think we should specify this version range, because we rely on the 3.x API:
diff --git a/setup.cfg b/setup.cfg
index d89a5b80..40e9fe36 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -53,7 +53,7 @@ install_requires =
aiofiles
jinja2>=2.10.1
ldap3
- metomi-isodatetime
+ metomi-isodatetime==3.*
psutil>=5.6.0
requests
sqlalchemy
Possibly even 3.0.*
? (Update from team catchup: whatever)
Co-authored-by: Ronnie Dutta <61982285+MetRonnie@users.noreply.github.com>
Co-authored-by: Ronnie Dutta <61982285+MetRonnie@users.noreply.github.com>
@@ -53,7 +53,7 @@ install_requires = | |||
aiofiles | |||
jinja2>=2.10.1 | |||
ldap3 | |||
metomi-isodatetime | |||
metomi-isodatetime==1!3.* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good spot about the epoch
Use new names of Isodatetime interfaces.