Skip to content

Commit

Permalink
default to UTC if the time zone is not provided in the .ics file
Browse files Browse the repository at this point in the history
  • Loading branch information
svilenkomitov committed Jun 2, 2023
1 parent f69e132 commit a717490
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ func (event *VEvent) getTimeProp(componentProperty ComponentProperty, expectAllD
return time.ParseInLocation(icalDateFormatUtc, dateStr+"Z", time.UTC)
} else if grp1len > 0 && grp3len == 0 && tOrZGrp == "" && zGrp == "" {
if propLoc == nil {
return time.ParseInLocation(icalDateFormatLocal, dateStr, time.Local)
return time.ParseInLocation(icalDateFormatUtc, dateStr+"Z", time.UTC)
} else {
return time.ParseInLocation(icalDateFormatLocal, dateStr, propLoc)
}
Expand Down

0 comments on commit a717490

Please # to comment.