-
Notifications
You must be signed in to change notification settings - Fork 531
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
Call to EventDateTime.DateTimeDateTimeOffset will result in an error in the underlying API #2580
Comments
I'll look into this on Monday. I would expect the JSON representation to be always in UTC, but I'll have to check. |
Ok thanks! |
Okay, looking at the Discovery doc, I'd expect this to be in UTC. The field is described like this:
The Discovery documentation for
That's what the DateTimeOffset property is expecting. We've recently seen another related issue for "google-datetime", in terms of precision - so it's entirely possible that this documentation is incorrect. I'll try to reproduce, then ask internally as to whether this is a Calendar service bug, or a documentation bug. We may need to change the generator to handle "google-datetime" and "date-time" differently (they currently generate calls to the same method) which will delay things a bit, but I'll dig into it. |
Right - I've reproduced the problem, and will file a bug internally to find out what's going on. |
Allright, i will keep using the "obsolete" DateTime property for now in my application. Events should default to the calenders Timezone as no other timezone value is given. The only workaround at the moment would be to parse exact with "yyyy-MM-dd'T'HH:mm:sszzz" in my case. Hope you can find out whats going on soon! |
Internal bug: b/308380258 (As an aside, I'll probably want to try to clear up the DateTime-based request properties as well at some point, so you'd specify TimeMinDateTimeOffset instead of TimeMin... but that'll happen a lot later.)
I think that would actually be a better workaround for now, to be honest. The |
Ok i see your point. I'll change my code accordingly. Please let me know - based on your findings - if the format definition will change in future ( yyyy-MM-ddTHH:mm:ss.SSSZ or yyyy-MM-dd'T'HH:mm:sszzz). |
My expectation is that we'll change the documentation to indicate that:
I'll keep this issue up to date. |
Allright, thank you! |
This is more complicated than expected - there are fields in the Storage API with a format of "date-time" (e.g. |
Oh yes it is always the same....seemed to be an easy fix in the beginning and turned out to be half of a nightmare afterwards. But i understand that handling different input formats can be tricky. I guess you'll find a fix anyway it will just take more time than expected. |
This should be fixed in version 1.64.0.3171. |
Hi,
i am expierencing the error below. Hope you can check whats going on here, thank you in advance.
regards,
Mark
Environment details
Steps to reproduce
Exception Details:
Source: System.Private.CoreLib
Message: String '2023-10-29T12:00:00+01:00' was not recognized as a valid DateTime.
Stack-Trace: at System.DateTimeParse.ParseExact(ReadOnlySpan
1 s, ReadOnlySpan
1 format, DateTimeFormatInfo dtfi, DateTimeStyles style, TimeSpan& offset)at System.DateTimeOffset.ParseExact(String input, String format, IFormatProvider formatProvider, DateTimeStyles styles)
at Google.Apis.Util.Utilities.GetDateTimeOffsetFromString(String raw)
at MyApp.Program.Main(String[] args) in C:\Users\Mark\source\repos\ConsoleApp4\ConsoleApp4\Program.cs: Zeile77
The text was updated successfully, but these errors were encountered: