Skip to content

ISSUE-268 # Support timezone-aware datetime assertions#771

Open
officialasishkumar wants to merge 1 commit into
authorjapps:masterfrom
officialasishkumar:issue-268-date-timezone
Open

ISSUE-268 # Support timezone-aware datetime assertions#771
officialasishkumar wants to merge 1 commit into
authorjapps:masterfrom
officialasishkumar:issue-268-date-timezone

Conversation

@officialasishkumar
Copy link
Copy Markdown

@officialasishkumar officialasishkumar commented May 24, 2026

Support timezone-aware datetime assertions

Fixed Which Issue?

PR Branch
https://github.com/officialasishkumar/zerocode/tree/issue-268-date-timezone

Motivation and Context

$LOCAL.DATETIME.AFTER and $LOCAL.DATETIME.BEFORE parsed ISO datetimes into LocalDateTime, which ignored offset semantics for values such as Z or +02:00. That meant comparisons used the wall-clock value instead of comparing equivalent instants.

This change adds a shared datetime parser for assertion expected values and actual response values. It preserves plain ISO local datetime support, honors ISO offsets and Z, and adds RFC-1123 HTTP-date parsing for values such as Last-Modified.

Validation run locally:

mvn -pl core -Dtest=ZeroCodeAssertionsProcessorImplTest test -ntp

Checklist:

  • 1. New Unit tests were added

    • 1.1 Covered in existing Unit tests
  • 2. Integration tests were added

    • 2.1 Covered in existing Integration tests
  • 3. Test names are meaningful

  • 3.1 Feature manually tested and outcome is successful

  • 4. PR doesn't break any of the earlier features for end users

    • 4.1 WARNING! This might break one or more earlier earlier features, hence left a comment tagging all reviewrs
  • 5. PR doesn't break the HTML report features directly

    • 5.1 Yes! I've manually run it locally and seen the HTML reports are generated perfectly fine
    • 5.2 Yes! I've opened the generated HTML reports from the /target folder and they look fine
  • 6. PR doesn't break any HTML report features indirectly

    • 6.1 I have not added or amended any dependencies in this PR
    • 6.2 I have double checked, the new dependency added or removed has not affected the report generation indirectly
    • 6.3 Yes! I've seen the Sample report screenshots here, and HTML report of the current PR looks simillar.
  • 7. Branch build passed in CI

  • 8. No 'package.*' in the imports

  • 9. Relevant DOcumentation page added or updated with clear instructions and examples for the end user

    • 9.1 Not applicable. This was only a code refactor change, no functional or behaviourial changes were introduced
  • 10. Http test added to http-testing-examples module(if applicable) ?

    • 10.1 Not applicable. The changes did not affect HTTP automation flow
  • 11. Kafka test added to kafka-testing-examples module(if applicable) ?

    • 11.1 Not applicable. The changes did not affect Kafka automation flow

@authorjapps
Copy link
Copy Markdown
Owner

authorjapps commented May 26, 2026

CI is running here now, once Green, we'll have a review soon.

Also, can you add couple of integration tests as well?
See here how to add: https://github.com/authorjapps/zerocode/blob/master/BUILDING.md

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.

2 participants