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

fix date parser in OfflineRetransmissionRequest class #1809

Merged
merged 4 commits into from
Jan 29, 2024

Conversation

Diewa
Copy link
Member

@Diewa Diewa commented Dec 28, 2023

context: The requests creating a task for a new retransmission, coming from the UI, have the following date format: 'yyyy-MM-dd'T'HH:mm:ss'Z'' or 'yyyy-MM-dd'T'HH:mm'Z''. If we set the date with minute precision from the UI, the request will not contain seconds at all. For example, 30.09.2023, 22:00:00 will be send as 30.09.2023, 22:00.

problem description:
We noticed that if the transmitted date has second precision (e.g., 30.09.2023, 22:00:11), it will not be handled correctly, and the user will receive an error: 'endTimestamp/startTimestamp must not be null,' which is related to how we handle requests.

This pull request adds support for a date format that includes seconds.

@Diewa Diewa added the bug label Dec 28, 2023
szczygiel-m
szczygiel-m previously approved these changes Dec 28, 2023
this.startTimestamp = null;
this.endTimestamp = null;
return;
private Instant initializeTimestamps(String timestamp) {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: can be renamed to initializeTimestamp since there is only one function parameter

@Diewa Diewa merged commit 87ecd94 into master Jan 29, 2024
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants