Skip to content
This repository has been archived by the owner on Oct 28, 2024. It is now read-only.

Commit

Permalink
fix schedule date picker not time zone safe
Browse files Browse the repository at this point in the history
closes #940
  • Loading branch information
sk22 committed Nov 27, 2023
1 parent d8c73ea commit f7dfebc
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1437,8 +1437,8 @@ private void pickScheduledDateTime() {
.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();
}
Expand Down

0 comments on commit f7dfebc

Please sign in to comment.