You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The hour is incorrectly timezoned if a date is instantiated by now() or by a value. For example I have this function:
tz.TZDateTime _nextInstanceOfHour({required int hour}) {
final tz.TZDateTime now = tz.TZDateTime.now(tz.local);
tz.TZDateTime scheduledDate = tz.TZDateTime(tz.local, now.year, now.month, now.day, hour);
...
}
The now variable is correctly set according to my timezone while it seems that the second variable called scheduledDate doesn't consider the tz.local at all. Example with some numbers:
For the local time of e.g. 2022-11-21 10:59 the now variable is set to 2022-11-21 9:59
However the scheduledDate with the hour parameter set to e.g. 11 is just left as 2022-11-21 11:00 when it should be 2022-11-21 10:00.
I'm on GMT+01:00.
The text was updated successfully, but these errors were encountered:
final String timeZoneName = await FlutterNativeTimezone.getLocalTimezone();
tz.setLocalLocation(tz.getLocation(timeZoneName));
Then both dates in the above example are the same, but not properly 1 hour shifted. I mean the first date is assigned to the now variable is not 2022-11-21 10:59 and the second remains the same 2022-11-21 10:00. In the effect if I use these datetimes in a local notification setup it is fired an hour later than expected.
The hour is incorrectly timezoned if a date is instantiated by
now(
) or by a value. For example I have this function:The
now
variable is correctly set according to my timezone while it seems that the second variable calledscheduledDate
doesn't consider the tz.local at all. Example with some numbers:For the local time of e.g.
2022-11-21 10:59
thenow
variable is set to2022-11-21 9:59
However the
scheduledDate
with thehour
parameter set to e.g.11
is just left as2022-11-21 11:00
when it should be2022-11-21 10:00
.I'm on GMT+01:00.
The text was updated successfully, but these errors were encountered: