fix schedule date picker not time zone safe

closes sk22#940
This commit is contained in:
sk 2023-11-27 22:20:12 +01:00
parent d8c73ea9af
commit f7dfebcbea
1 changed files with 2 additions and 2 deletions

View File

@ -1437,8 +1437,8 @@ public class ComposeFragment extends MastodonToolbarFragment implements OnBackPr
.withMinute(0);
new DatePickerDialog(getActivity(), (datePicker, year, arrayMonth, dayOfMonth) -> {
new TimePickerDialog(getActivity(), (timePicker, hour, minute) -> {
updateScheduledAt(LocalDateTime.of(year, arrayMonth + 1, dayOfMonth, hour, minute)
.toInstant(OffsetDateTime.now().getOffset()));
LocalDateTime at=LocalDateTime.of(year, arrayMonth + 1, dayOfMonth, hour, minute);
updateScheduledAt(at.toInstant(ZoneId.systemDefault().getRules().getOffset(at)));
}, soon.getHour(), soon.getMinute(), DateFormat.is24HourFormat(getActivity())).show();
}, soon.getYear(), soon.getMonthValue() - 1, soon.getDayOfMonth()).show();
}