question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

String was not recognized as a valid DateTime.

See original GitHub issue

OGCS Version: v2.8.2.0 Alpha Installed or Portable: Portable

Bug Description

2019-10-22 10:51:44,741 DEBUG  25 OutlookGoogleCalendarSync.OutlookOgcs.Calendar [0] -  Processing recurring master appointment.
2019-10-22 10:51:44,742 DEBUG  25 OutlookGoogleCalendarSync.OutlookOgcs.Calendar [0] -  Processing >> 9/21/2012 (R) => "Loren Ipsum Anniversary"
2019-10-22 10:51:44,797 DEBUG  25 OutlookGoogleCalendarSync.Recurrence [0] -  Converting RRULE:FREQ=YEARLY;UNTIL=20350921
2019-10-22 10:51:44,820 ERROR  25 OutlookGoogleCalendarSync.Console [0] -  Appointment update failed.
2019-10-22 10:51:44,822 ERROR  25 OutlookGoogleCalendarSync.Console [0] -  String was not recognized as a valid DateTime.
2019-10-22 10:51:44,862 ERROR  25 OutlookGoogleCalendarSync.OGCSexception [0] -  System.FormatException: String was not recognized as a valid DateTime.
2019-10-22 10:51:44,863 ERROR  25 OutlookGoogleCalendarSync.OGCSexception [0] -  Code: 0x80131537;-2146233033
2019-10-22 10:51:44,863 ERROR  25 OutlookGoogleCalendarSync.OGCSexception [0] -     at System.DateTimeParse.ParseExact(String s, String format, DateTimeFormatInfo dtfi, DateTimeStyles style)
   at System.DateTime.ParseExact(String s, String format, IFormatProvider provider, DateTimeStyles style)
   at OutlookGoogleCalendarSync.Recurrence.buildOutlookPattern(Event ev, AppointmentItem ai, RecurrencePattern& oPattern)
   at OutlookGoogleCalendarSync.Recurrence.CompareOutlookPattern(Event ev, RecurrencePattern& aiOpattern, Direction syncDirection, StringBuilder sb, Int32& itemModified)
   at OutlookGoogleCalendarSync.OutlookOgcs.Calendar.UpdateCalendarEntry(AppointmentItem& ai, Event ev, Int32& itemModified, Boolean forceCompare)
   at OutlookGoogleCalendarSync.OutlookOgcs.Calendar.UpdateCalendarEntries(Dictionary`2 entriesToBeCompared, Int32& entriesUpdated)

Steps to Reproduce the Issue

Was not issue prior to alpha upgrade. Only occurs for one profile that is GC -> Outlook. Other GC -> Outlook works fine.

Other yearly recurring do not error out so I am guessing it has to do with a yearly recurring that contain an end year (e.g. 2035)?

Any other information

Related issues?

https://github.com/phw198/OutlookGoogleCalendarSync/issues/5 https://github.com/phw198/OutlookGoogleCalendarSync/issues/21 https://github.com/phw198/OutlookGoogleCalendarSync/issues/32

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
sunk818commented, Nov 11, 2019

Thanks for the fix. I was going to say, this issue only occurred if I modified an existing appointment where the FREQ=YEARLY changed to FREQ=YEARLY;UNTIL=20350921. I think this was the case for newly created recurring events as well.

1reaction
jondavis9898commented, Nov 11, 2019

@phw198 - Confirmed that 2.8.2.3 resolves the issue. Thank you!!

Read more comments on GitHub >

github_iconTop Results From Across the Web

String was not recognized as a valid DateTime " format dd ...
The format pattern above is dd/MM/yyyy so a text string with a time in it will not be parsed properly. You'll need to...
Read more >
Resolve 'String Was Not Recognized As A Valid DateTime ...
DateTime date = DateTime.Parse(dateString); It generates the Exception of type System.FormatException as elaborated above as there are two ...
Read more >
String Was Not Recognized As a Valid DateTime
The string was not recognized as a valid DateTime error occurs due to using the Parse() function with particular format expectations or having...
Read more >
“String Was Not Recognized as a Valid DateTime.” Why It ...
Error messages are not fun. This post teaches you what "String was not recognized as a valid DateTime" is about, and what to...
Read more >
String was not recognized as valid date Time in C# - Studio
Show us the string value. Parse uses your system default datetime format to try to parse it. So if the string is in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found