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

Show local time on/Off + Device Time Zone Change #361

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

Pluu
Copy link
Contributor

@Pluu Pluu commented Feb 17, 2017

Issue

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.

#198 (comment)

So we added processing below.

  • Add, com.jakewharton.threetenabp:threetenabp:1.0.5
  • Custom Gson registerTypeAdapter (String <-> ZonedDateTime)
    • ZonedDateTime is fixed Asia/Tokyo TimeZone
  • Custom orma annotation.StaticTypeAdapter (String <-> ZonedDateTime)
    • ZonedDateTime is fixed Asia/Tokyo TimeZone

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

- DroidKaigi#198

## Desc

- Add, ThreeTenABP
- Add, Gson Custom TypeAdapter (ZonedDateTimeSerializer, ZonedDateTimeDeserializer)
- Change Data type Date -> ZonedDateTime (Session stime/etime)
- Support, Device Zone Change
- Support, Display Time On/Off
# Conflicts:
#	app/src/main/java/io/github/droidkaigi/confsched2017/viewmodel/SessionViewModel.java
#	app/src/main/java/io/github/droidkaigi/confsched2017/viewmodel/SessionsViewModel.java
@konifar
Copy link
Contributor

konifar commented Feb 17, 2017

👀

@konifar
Copy link
Contributor

konifar commented Feb 18, 2017

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!

@Pluu
Copy link
Contributor Author

Pluu commented Feb 19, 2017

it's ok.
Is only PR as a way to solve issue.

@konifar
Copy link
Contributor

konifar commented Feb 23, 2017

Sorry to be late 🙇
I'll review this tonight!

@Pluu
Copy link
Contributor Author

Pluu commented Feb 23, 2017

^^ no problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants