Skip to content

Conversation

@nileader
Copy link
Contributor

@nileader nileader commented Jan 6, 2026

The JsonNormalizerTest in the JToon project contains 4 test cases related to time types that fail in my UTC+8 timezones because they use hardcoded expected values, while JsonNormalizer uses the system default timezone when processing SQL time types.

Linked Issue

Closes #83

Description

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)
  • Performance improvement
  • Test coverage improvement

Changes Made

For dev.toonformat.jtoon.normalizer.JsonNormalizerTest

  • Replace hardcoded timezone values with dynamic computation based on system timezone
  • Update testSQLTime to use time.toLocalTime().format(DateTimeFormatter.ISO_LOCAL_TIME)
  • Update testSQLTimeStamp to use dateTime.toLocalDateTime().format(DateTimeFormatter.ISO_LOCAL_DATE_TIME)
  • Update Calendar and GregorianCalendar tests to use input.toInstant().toString()
  • Add missing DateTimeFormatter import for time formatting

Testing

  • All existing tests pass
  • Added new tests for changes
  • Tests cover edge cases and spec compliance

Pre-submission Checklist

  • My code follows the project's coding standards
  • I have run code formatting/linting tools
  • I have added tests that prove my fix/feature works
  • New and existing tests pass locally
  • I have updated documentation if needed
  • I have reviewed the TOON specification for relevant sections

Breaking Changes

  • No breaking changes
  • Breaking changes (describe migration path below)

…t#83)

* Replace hardcoded timezone values with dynamic computation based on system timezone
* Update testSQLTime to use time.toLocalTime().format(DateTimeFormatter.ISO_LOCAL_TIME)
* Update testSQLTimeStamp to use dateTime.toLocalDateTime().format(DateTimeFormatter.ISO_LOCAL_DATE_TIME)
* Update Calendar and GregorianCalendar tests to use input.toInstant().toString()
* Add missing DateTimeFormatter import for time formatting
@nileader nileader requested a review from a team as a code owner January 6, 2026 12:53
@jenspapenhagen jenspapenhagen merged commit 0edc592 into toon-format:main Jan 6, 2026
1 check passed
@github-actions
Copy link
Contributor

github-actions bot commented Jan 6, 2026

Code Coverage

Overall Project 98.22% 🍏

There is no coverage information present for the Files changed

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.

Timezone-related test failures in JsonNormalizerTest

2 participants