Skip to content

Commit

Permalink
Performance enhancement for solidus-prefixed time zone strings. Added…
Browse files Browse the repository at this point in the history
… release-notes.md #204
  • Loading branch information
rianjs committed Dec 15, 2016
1 parent fc90856 commit f2590f4
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
11 changes: 11 additions & 0 deletions release-notes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
## Release notes

A listing of what each [Nuget package](https://www.nuget.org/packages/Ical.Net) version represents.

### v2

* 2.2.24: Performance enhancement for solidus-prefixed time zones ([#204](https://github.com/rianjs/ical.net/issues/204)).
* 2.2.23: Bugfix for culture for geographic location serialization. RFC-5545 requires coordinates to use decimal points, not commas, regardless of culture. Correct: `1.2345`. Incorrect: `1,2345`. ([#202](https://github.com/rianjs/ical.net/issues/202))
* 2.2.22: Bugfix for `Event` serialization that always changed the `Duration` to 0. Serialization shouldn't have side effects. ([#199](https://github.com/rianjs/ical.net/issues/199))

Changes weren't systematically tracked before 2.2.22.
5 changes: 5 additions & 0 deletions v2/ical.NET/Utility/DateUtil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,11 @@ public static DateTimeZone GetZone(string tzId)
return LocalDateTimeZone;
}

if (tzId.StartsWith("/"))
{
tzId = tzId.Substring(1, tzId.Length - 1);
}

var zone = DateTimeZoneProviders.Tzdb.GetZoneOrNull(tzId);
if (zone != null)
{
Expand Down
5 changes: 5 additions & 0 deletions v3/ical.NET/Utility/DateUtil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,11 @@ public static DateTimeZone GetZone(string tzId)
return LocalDateTimeZone;
}

if (tzId.StartsWith("/"))
{
tzId = tzId.Substring(1, tzId.Length - 1);
}

var zone = DateTimeZoneProviders.Tzdb.GetZoneOrNull(tzId);
if (zone != null)
{
Expand Down

0 comments on commit f2590f4

Please sign in to comment.