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

Accept timezone #4

Closed
amannn opened this issue Nov 25, 2020 · 3 comments · Fixed by #21
Closed

Accept timezone #4

amannn opened this issue Nov 25, 2020 · 3 comments · Fixed by #21
Labels
enhancement New feature or request

Comments

@amannn
Copy link
Owner

amannn commented Nov 25, 2020

react-intl supports a few more options on its provider. Should we support some of them as well? E.g. formats could be interesting.

@amannn amannn added the enhancement New feature or request label Nov 25, 2020
@amannn
Copy link
Owner Author

amannn commented Dec 4, 2020

formats is covered by #14. Still need to investigate timeZone. Is timeZone necessary for timestamp numbers as dates or do they have a defined time zone?

@amannn
Copy link
Owner Author

amannn commented Dec 11, 2020

Handling the timeZone is indeed interesting. A server request doesn't include this information, therefore ideally we'd use a setting saved in the user profile or otherwise information from GeoIP. Both can not be known by this library, therefore the user should provide this.

See also https://stackoverflow.com/questions/6091804/is-there-another-way-to-get-a-users-time-zone-from-a-httpservletrequest-object/6091881#6091881

@amannn amannn changed the title Accept more options in the provider Accept timezone Dec 14, 2020
@amannn
Copy link
Owner Author

amannn commented Dec 14, 2020

On the client side this is different. E.g. when the user provides a time via a date picker for example, we can typically read the timezone of the user and add it to the date. Not sure yet if that affects this library, as during render only timezone-aware dates should be used. In the change handler of a date picker a timezone can be added immediately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant