From a71749073395c4d1dba0cd637bafe9cdf46b3bb3 Mon Sep 17 00:00:00 2001 From: Svilen Komitov Date: Fri, 2 Jun 2023 15:34:15 +0300 Subject: [PATCH] default to UTC if the time zone is not provided in the .ics file --- components.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components.go b/components.go index b038448..fbe2238 100644 --- a/components.go +++ b/components.go @@ -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) }