Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Location with the name "CDT" doesn't exist - Issues with daylight saying times zones? #192

Open
JonasJW opened this issue May 9, 2024 · 1 comment

Comments

@JonasJW
Copy link

JonasJW commented May 9, 2024

In my production app I get the exception Location with the name "CDT" doesn't exist. I also gotten exceptions for Same for EDT and PST. Also I have gotten exceptions for Location with the name "-03" doesn't exist.

This is my code:

final currentTimeZone = DateTime.now().timeZoneName;
tz.Location location = tz.getLocation(currentTimeZone);
tz.TZDateTime tzDate = tz.TZDateTime.from(date, location);

I'm omporting 'package:timezone/data/latest_all.dart' as tz; and 'package:timezone/timezone.dart' as tz;

CDT and PST seem to be daylight saving timezones.

Is there any recommended way on how to handle these cases?

@PadreMontoya
Copy link

Same issue for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants