fix schedule date picker not time zone safe
closes sk22#940
This commit is contained in:
parent
d8c73ea9af
commit
f7dfebcbea
|
@ -1437,8 +1437,8 @@ public class ComposeFragment extends MastodonToolbarFragment implements OnBackPr
|
||||||
.withMinute(0);
|
.withMinute(0);
|
||||||
new DatePickerDialog(getActivity(), (datePicker, year, arrayMonth, dayOfMonth) -> {
|
new DatePickerDialog(getActivity(), (datePicker, year, arrayMonth, dayOfMonth) -> {
|
||||||
new TimePickerDialog(getActivity(), (timePicker, hour, minute) -> {
|
new TimePickerDialog(getActivity(), (timePicker, hour, minute) -> {
|
||||||
updateScheduledAt(LocalDateTime.of(year, arrayMonth + 1, dayOfMonth, hour, minute)
|
LocalDateTime at=LocalDateTime.of(year, arrayMonth + 1, dayOfMonth, hour, minute);
|
||||||
.toInstant(OffsetDateTime.now().getOffset()));
|
updateScheduledAt(at.toInstant(ZoneId.systemDefault().getRules().getOffset(at)));
|
||||||
}, soon.getHour(), soon.getMinute(), DateFormat.is24HourFormat(getActivity())).show();
|
}, soon.getHour(), soon.getMinute(), DateFormat.is24HourFormat(getActivity())).show();
|
||||||
}, soon.getYear(), soon.getMonthValue() - 1, soon.getDayOfMonth()).show();
|
}, soon.getYear(), soon.getMonthValue() - 1, soon.getDayOfMonth()).show();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue