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

should format tag use timezone of provided date if it has one (E.G: ZonedDateTime)? #2

Closed
ScottDennison opened this issue Nov 4, 2015 · 2 comments
Labels

Comments

@ScottDennison
Copy link

The falling back to system default zoneId behaviour is good for dates and times which do not have a zone. However, in the instance of ZonedDateTime, they DO have a zone, and it would be helpful if it retained that zoneId (unless overridden in the tag)

The current mechanism means that servlet code that manipulates the zone of a ZonedDateTime (E.G withZoneSameInstant), has the zone changes discarded when rendered.

In my application, all dates are stored in the database in UTC, and as part of the DAO layer, converted to a configurable timezone. The tag not obeying this timezone means that the times displayed are wrong.
For now, as the configurable timezone is global throughout the UI of the application, I have added a zoneid tag to my template, but this feels like a bit of a hack.

@sargue
Copy link
Owner

sargue commented Nov 5, 2015

I agree it should honor the zone of the value object if it has one. Let me write some test to diagonse it.

@sargue sargue added the bug label Nov 6, 2015
@sargue sargue closed this as completed in 7410800 Nov 6, 2015
@sargue
Copy link
Owner

sargue commented Nov 6, 2015

Reopening as travis CI test is broken even as the test run ok on local.

@sargue sargue reopened this Nov 6, 2015
@sargue sargue closed this as completed in a1c7dc4 Nov 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants