-
Notifications
You must be signed in to change notification settings - Fork 98
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
Use isoformat for mscolab timestamps #2345
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 think this one needs to be changed as well:
Line 58 in 3ed347b
"time": message.created_at.strftime("%Y-%m-%d, %H:%M:%S.%f %z") |
mslib/mscolab/file_manager.py
Outdated
@@ -399,7 +400,7 @@ def get_all_changes(self, op_id, user, named_version=False): | |||
'comment': change.comment, | |||
'version_name': change.version_name, | |||
'username': change.user.username, | |||
'created_at': change.created_at.strftime("%Y-%m-%d, %H:%M:%S.%f %z") | |||
'created_at': created_at_isoformat(change.created_at) |
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.
What is wrong with change.created_at.isoformat()
?
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.
seems I looked only on that with the None state.
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.
What None state?
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.
on a test: test_get_message_dict
The function strftime returns None when created_at is initialized. But isoformat crashes.
But in that case isoformat gives an AttributeError
and that is because I need to change the test too.
Purpose of PR?:
Fixes #2321
Does this PR introduce a breaking change?
time format change for mscolab