forked from localvoid/timezone
-
Notifications
You must be signed in to change notification settings - Fork 66
Open
Description
In the following test case, hours should be 19, not 20.
test('handles UTC correctly', () {
tz.initializeTimeZones();
final easternLocation = tz.getLocation('America/New_York');
final DateTime localDateTime = DateTime(2023, 12, 25, 14, 30); // Dec 25 2023 2:30PM
final tz.TZDateTime estDateTime = tz.TZDateTime.from(localDateTime, easternLocation);
final DateTime utcDateTime = estDateTime.toUtc();
expect(utcDateTime.hour, equals(19)); // 14:30 EST = 19:30 UTC
return utcDateTime;
});
Metadata
Metadata
Assignees
Labels
No labels