Skip to content

Commit

Permalink
Merge pull request #205 from rianjs/SolidusTrim
Browse files Browse the repository at this point in the history
Performance enhancement for solidus-prefixed time zone strings. Added…
  • Loading branch information
rianjs authored Dec 15, 2016
2 parents fc90856 + 87cbf1b commit 1b1c6de
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 1 deletion.
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.
2 changes: 1 addition & 1 deletion v2/Ical.Net.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>Ical.Net</id>
<version>2.2.23</version>
<version>2.2.24</version>
<title>Ical.Net</title>
<authors>Rian Stockbower, Douglas Day, M. David Peterson</authors>
<owners>Rian Stockbower</owners>
Expand Down
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 1b1c6de

Please sign in to comment.