conference-app-2017
conference-app-2017 copied to clipboard
Show local time on/Off + Device Time Zone Change
Issue
- https://github.com/DroidKaigi/conference-app-2017/issues/198
Overview (Required)
Session#stime / Session#etime
changes from Date
to ZonedDateTime
.
Since Date has GMT, it turned out that the value changes depending on the time zone of the device.
https://github.com/DroidKaigi/conference-app-2017/issues/198#issuecomment-280082697
So we added processing below.
- Add,
com.jakewharton.threetenabp:threetenabp:1.0.5
- Custom Gson registerTypeAdapter (String <-> ZonedDateTime)
- ZonedDateTime is fixed
Asia/Tokyo
TimeZone
- ZonedDateTime is fixed
- Custom orma annotation.StaticTypeAdapter (String <-> ZonedDateTime)
- ZonedDateTime is fixed
Asia/Tokyo
TimeZone
- ZonedDateTime is fixed
By using the above, Session#stime / Session#etime
certainly maintains the state of Asia/Tokyo
.
Also, we will process it using the current location on/off and timezone in LocaleUtil#getDisplayDate
.
Please note that GMT is forcibly modified by time zone.
I'm sorry. The commit log became cluttered due to various trials. 🙇 🙇 🙇
Links
Screenshot
Before | After |
---|---|
https://youtu.be/XAu4TpAg4hI |
:eyes:
Thanks for contribution! 😄 Sorry, let me consider we should localize this app or not. Because we will have to think localization during development. I guess it's hard for the contributors. I'll reply by evening!
it's ok. Is only PR as a way to solve issue.
Sorry to be late 🙇 I'll review this tonight!
^^ no problem