From 87cbf1b682e0a5e06cf3caa9f62450f34fa28a4e Mon Sep 17 00:00:00 2001 From: Rian Stockbower Date: Thu, 15 Dec 2016 15:46:26 -0500 Subject: [PATCH] Performance enhancement for solidus-prefixed time zone strings. Added release-notes.md #204 --- release-notes.md | 11 +++++++++++ v2/Ical.Net.nuspec | 2 +- v2/ical.NET/Utility/DateUtil.cs | 5 +++++ v3/ical.NET/Utility/DateUtil.cs | 5 +++++ 4 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 release-notes.md diff --git a/release-notes.md b/release-notes.md new file mode 100644 index 000000000..371ed1519 --- /dev/null +++ b/release-notes.md @@ -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. \ No newline at end of file diff --git a/v2/Ical.Net.nuspec b/v2/Ical.Net.nuspec index d3a6a080b..2c587fa31 100644 --- a/v2/Ical.Net.nuspec +++ b/v2/Ical.Net.nuspec @@ -2,7 +2,7 @@ Ical.Net - 2.2.23 + 2.2.24 Ical.Net Rian Stockbower, Douglas Day, M. David Peterson Rian Stockbower diff --git a/v2/ical.NET/Utility/DateUtil.cs b/v2/ical.NET/Utility/DateUtil.cs index 61850fe7e..bbeb49abe 100644 --- a/v2/ical.NET/Utility/DateUtil.cs +++ b/v2/ical.NET/Utility/DateUtil.cs @@ -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) { diff --git a/v3/ical.NET/Utility/DateUtil.cs b/v3/ical.NET/Utility/DateUtil.cs index c8a01e245..3c3232907 100644 --- a/v3/ical.NET/Utility/DateUtil.cs +++ b/v3/ical.NET/Utility/DateUtil.cs @@ -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) {