mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-05-25 15:16:01 +00:00
fix timezone issues
This commit is contained in:
parent
8f711a8872
commit
02ffe612ab
2 changed files with 3 additions and 3 deletions
|
|
@ -2,8 +2,8 @@
|
|||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
package="com.habitrpg.android.habitica"
|
||||
android:versionCode="44"
|
||||
android:versionName="0.0.27"
|
||||
android:versionCode="46"
|
||||
android:versionName="0.0.27.1"
|
||||
android:screenOrientation="portrait"
|
||||
android:installLocation="auto" >
|
||||
|
||||
|
|
|
|||
|
|
@ -268,7 +268,7 @@ public class MainActivity extends BaseActivity implements HabitRPGUserCallback.O
|
|||
if (user != null) {
|
||||
Calendar mCalendar = new GregorianCalendar();
|
||||
TimeZone mTimeZone = mCalendar.getTimeZone();
|
||||
long offset = -TimeUnit.MINUTES.convert(mTimeZone.getRawOffset(), TimeUnit.MILLISECONDS);
|
||||
long offset = -TimeUnit.MINUTES.convert(mTimeZone.getOffset(mCalendar.getTimeInMillis()), TimeUnit.MILLISECONDS);
|
||||
if (offset != user.getPreferences().getTimezoneOffset()) {
|
||||
Map<String, Object> updateData = new HashMap<>();
|
||||
updateData.put("preferences.timezoneOffset", String.valueOf(offset));
|
||||
|
|
|
|||
Loading…
Reference in a new issue