-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
System.TimeZoneNotFoundException: 'The time zone ID '...' was not found on the local computer.' #53
Comments
Hi there, thanks for the report! I think I have seen this before... So just to be clear: this is a Blazor Hybrid app? Are you running this on an emulator or physical device? In either case, what are the details? I'd love to see a reproduction so I can see what is going on and fix it! |
Hi, Mr. Versluis. I'm sorry I couldn't reach back sooner. Thanks for your reply. Yes, this is indeed a Blazor Hybrid app and I'm running it on an actual Android device (Nokia 5.4 running on android 12). At the moment I can't really try it on an emulator for storage reasons. As for the code, I'm simply running this bit for testing purposes: As I mentioned, I have also tried using DateTimeOffset.Now / DateTimeOffset.UtcNow instead. Creating an event works, but the problem happens when I try to fetch the events for this calendar or when I try to GetEvent("EventID") on the specific Ids returned from this function in my tests. I noticed that I can fetch events by calendars I have not created through the app or individually from event Ids that already exist on the phone, by guessing some Ids based on the incremental number pattern, but not the ones I create through this test. |
@jfversluis @mizuhs I encountered the same problem on Android (native app on physical device). Basically, I'm trying to fetch all events in all calendars and it happens that sometimes I get this exception (not every time):
The exception is thrown by the line I couldn't get rid of the exception but only to fallback to
@jfversluis What do you think about this? Should I create a PR to solve this issue? |
Hello all. In my case, the program stopped at the "CreateEvent" and "ToEvent" methods in CalendarStore.android.cs. This is because "TimeZoneInfo.Local.StandardName" does not return the TimeZone ID used by Android, unlike "TimeZoneInfo.Local.Id". On the other hand, the error that occurs with "ToEvent" is due to incorrect data being stored, so make the following temporary changes, delete the incorrect data, delete the comments and temporary code, and save again.
Now, try it out. |
Hi,
First of all, thanks for your amazing plugin! I've been running on this issue while attempting to load the events on Android. The application throws an exception and I'm not sure about how to work around this issue.
Loading/creating calendars and creating events work just fine, but loading events will throw this exception every time. I've tried to create the event with both DateTimeOffset.Now and DateTimeOffset.UtcNow to no avail. I have also tried to construct a new DateTime directly in the parameters, with Year, Month, Day, Hour, Minute, Second (with and without specifying a Kind parameter, both with Utc and Unspecified values).
Nothing has worked so far.
Interestingly, if I run the app on a Windows platform, it works just fine (Blazor MAUI App).
Plugin version is 2.0.0
The text was updated successfully, but these errors were encountered: