Skip to content

Use fixed GMT time-zone for WebSessionManager Clock [SPR-15675] #20234

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

Closed
spring-projects-issues opened this issue Jun 16, 2017 · 3 comments
Closed
Assignees
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: task A general task
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

spring-projects-issues commented Jun 16, 2017

Rob Winch opened SPR-15675 and commented

Currently WebSession API uses Instant for many methods. It might be good to use a type that contains timezone information it rather than the implied timezone of GMT


Affects: 5.0 RC2

Issue Links:

Referenced from: commits ba3a12e

@spring-projects-issues
Copy link
Collaborator Author

Rossen Stoyanchev commented

In the very least we need to fix the following line which uses Clock.systemDefaultZone but should use a fixed timezone (GMT) so that session times are always relative to the same time zone. Beyond that I am not convinced that we need to expose anything more than Instant. It is perfectly comparable to any other "externally created moment". Why does it need to be ZonedDateTime rather than Instant? All that matters is the time relative to session creation.

@spring-projects-issues
Copy link
Collaborator Author

Sébastien Deleuze commented

I tend to agree since the usage of ZonedDateTime in HttpHeaders is mainly driven by the fact that the time zone information is directly available in the header value we parse. Not sure that applies here, so I would be for just setting GMT fixed time zone as proposed by Rossen. Would that be ok from your point of view Rob Winch?

@spring-projects-issues
Copy link
Collaborator Author

Sébastien Deleuze commented

As discussed with Rob Winch after today's meeting, I turn this issue into using a fixed GMT time-zone with existing Instant type.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: task A general task
Projects
None yet
Development

No branches or pull requests

2 participants