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

time zone specific date in response when requested #19

Open
iameugenejo opened this issue Aug 29, 2019 · 5 comments
Open

time zone specific date in response when requested #19

iameugenejo opened this issue Aug 29, 2019 · 5 comments

Comments

@iameugenejo
Copy link

Current spec requires any date time field in response to be in UTC timezone.

It's generally client's responsibility to format the date time field,

but, is there a use case that we want to allow users to ask for date time field in response in specific timezone?

@ardiesaeidi
Copy link
Member

My concern with allowing this is now the API developer will have to manage datetime properly and that becomes a slippery slope.

  • UTC is more reliable, the client can display the date and time in whatever format they want
  • Users are in timezones, not offsets and that can change over time
    • What happens if a client saves the converted date values and they are no longer correct?
    • For example, what if california no longer observes DST but a client stores those values?

@teehill
Copy link
Contributor

teehill commented Aug 29, 2019

So just use UTC with offset and avoid the daylight savings debacle?

@iameugenejo
Copy link
Author

iameugenejo commented Aug 29, 2019

I agree, but what do we do when customers want the date fields in their timezone offset at the time of their request?

Interpreting the time difference due to timezone change after DST change is on them in that case, of course.

@iameugenejo
Copy link
Author

By the way, I have 0 problem with responding UTC date fields as long as I can include non-UTC date time for downloadable contents for this issue - #20

@ardiesaeidi
Copy link
Member

So just use UTC with offset and avoid the daylight savings debacle?

No unfortunately offset is heavily dependent on the timezone and that is also affected by DST.

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

No branches or pull requests

3 participants