@@ -245,6 +245,11 @@ func (p *Parser) parseICalLastModified(iCalContent string) time.Time {
245245 re , _ := regexp .Compile (`LAST-MODIFIED:.*?\n` )
246246 result := re .FindString (iCalContent )
247247 modified := trimField (result , "LAST-MODIFIED:" )
248+
249+ if ! strings .Contains (modified , "Z" ) {
250+ modified = fmt .Sprintf ("%sZ" , modified )
251+ }
252+
248253 t , _ := time .Parse (IcsFormat , modified )
249254 return t
250255}
@@ -488,7 +493,13 @@ func (p *Parser) parseEventCreated(eventData string) time.Time {
488493 re , _ := regexp .Compile (`CREATED:.*?\n` )
489494 result := re .FindString (eventData )
490495 created := trimField (result , "CREATED:" )
496+
497+ if ! strings .Contains (created , "Z" ) {
498+ created = fmt .Sprintf ("%sZ" , created )
499+ }
500+
491501 t , _ := time .Parse (IcsFormat , created )
502+
492503 return t
493504}
494505
@@ -497,7 +508,13 @@ func (p *Parser) parseEventModified(eventData string) time.Time {
497508 re , _ := regexp .Compile (`LAST-MODIFIED:.*?\n` )
498509 result := re .FindString (eventData )
499510 modified := trimField (result , "LAST-MODIFIED:" )
511+
512+ if ! strings .Contains (modified , "Z" ) {
513+ modified = fmt .Sprintf ("%sZ" , modified )
514+ }
515+
500516 t , _ := time .Parse (IcsFormat , modified )
517+
501518 return t
502519}
503520
0 commit comments