fix: TimeZone

This commit is contained in:
J-Jamet 2024-11-13 21:13:50 +01:00
parent 55206b3dde
commit 6de14a3840

View file

@ -123,7 +123,7 @@ class DateInstant : Parcelable {
} }
fun setDate(year: Int, month: Int, day: Int) { fun setDate(year: Int, month: Int, day: Int) {
mInstant = DateTime(mInstant) mInstant = DateTime(mInstant, DateTimeZone.getDefault())
.withYear(year) .withYear(year)
.withMonthOfYear(month) .withMonthOfYear(month)
.withDayOfMonth(day) .withDayOfMonth(day)
@ -131,7 +131,7 @@ class DateInstant : Parcelable {
} }
fun setTime(hour: Int, minute: Int) { fun setTime(hour: Int, minute: Int) {
mInstant = DateTime(mInstant) mInstant = DateTime(mInstant, DateTimeZone.getDefault())
.withHourOfDay(hour) .withHourOfDay(hour)
.withMinuteOfHour(minute) .withMinuteOfHour(minute)
.toInstant() .toInstant()