Skip to content
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

Merged
merged 7 commits into from
May 14, 2024
Merged

Conversation

ReimarBauer
Copy link
Member

Purpose of PR?:

Fixes #2321

Does this PR introduce a breaking change?
time format change for mscolab

@ReimarBauer ReimarBauer requested a review from matrss May 8, 2024 16:29
Copy link
Collaborator

@matrss matrss left a 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:

"time": message.created_at.strftime("%Y-%m-%d, %H:%M:%S.%f %z")

@@ -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)
Copy link
Collaborator

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()?

Copy link
Member Author

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.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What None state?

Copy link
Member Author

@ReimarBauer ReimarBauer May 13, 2024

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.

@matrss matrss changed the title use isoformat for mscolab create_at times Use isoformat for mscolab timestamps May 14, 2024
@matrss matrss merged commit 48a15f5 into Open-MSS:develop May 14, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

review and refactor usage of strptime to an iso time format (mscolab)
2 participants