Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
mattjohnsonpint committed Jan 11, 2022
1 parent e09d09e commit 815c0e2
Showing 1 changed file with 24 additions and 18 deletions.
42 changes: 24 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,20 @@
PM> Install-Package TimeZoneConverter
```

This library should be compatible with .NET Standard 1.1 and greater, as well as .NET Framework 3.5 and greater.
See the [.NET Standard Platform Support Matrix][1] for further details about .NET Standard,
and please raise an issue if you encounter any compatibility errors.
As of version 4.0.0, *TimeZoneConverter* works with all of the following:

#### Important note on .NET 6+
- .NET 5 or greater
- .NET Core 2.0 or greater
- .NET Framework 4.6.1 and greater

Note that .NET Framework versions less than 4.6.1 are no longer supported.

.NET 6 will have built-in support for IANA and Windows time zones in a cross-platform manner, removing the need for the TimeZoneConverter library.
**If you are planning to use .NET 6 (or higher), you don't need to use the TimeZoneConverter library!**
#### Important note on .NET 6+

Both automatic time zone conversion and APIs for manual time zone conversion are included with .NET as of .NET 6 Preview 4.
You can read more about it in [the blog post here](https://devblogs.microsoft.com/dotnet/date-time-and-time-zone-enhancements-in-net-6/#time-zone-conversion-apis).
.NET 6 has built-in support for IANA and Windows time zones in a cross-platform manner, removing the need for the TimeZoneConverter library.
It relies on [.NET's ICU integration](https://docs.microsoft.com/dotnet/core/extensions/globalization-icu) to perform this functionality.
See [the .NET blog](https://devblogs.microsoft.com/dotnet/date-time-and-time-zone-enhancements-in-net-6/#time-zone-conversion-apis) for details.
**If you are targeting only .NET 6 (or higher), and you have either platform-provided or App-local ICU enabled, you don't need to use the TimeZoneConverter library!**

#### Note on OS Data Dependencies

Expand All @@ -40,11 +43,17 @@ For example, the Alpine Linux Docker images for .NET Core no longer ship with `t
PM> Install-Package TimeZoneConverter.Posix
```

This library should be compatible with .NET Standard 1.3 and greater, as well as .NET Framework 4.5 and greater.
See the [.NET Standard Platform Support Matrix][1] for further details about .NET Standard,
and please raise an issue if you encounter any compatibility errors.
This is a separate helper library that is maintained in the same repository. You only need it if you require support for POSIX time zones.

As of version 3.0.0, *TimeZoneConverter.Posix* works with all of the following:

- .NET 5 or greater
- .NET Core 2.0 or greater
- .NET Framework 4.6.1 and greater

Note that .NET Framework versions less than 4.6.1 are no longer supported.

Note that `TimeZoneConverter.Posix` takes a dependency on both `TimeZoneConverter` and [Noda Time][2].
Also note that `TimeZoneConverter.Posix` takes a dependency on both `TimeZoneConverter` and [Noda Time][2].

## Notes

Expand Down Expand Up @@ -90,8 +99,6 @@ string tz = TZConvert.WindowsToIana("Eastern Standard Time", "CA");
```

Get a `TimeZoneInfo` object from .NET Core, regardless of what OS you are running on:
*Helps with .NET Runtime issue [#18644][8]*
***This function is only available for .NET Standard 1.3+ or full .NET Framework targets***

```csharp
// Either of these will work on any platform:
Expand Down Expand Up @@ -155,15 +162,14 @@ string posix = PosixTimeZone.FromTimeZoneInfo(TimeZoneInfo.Local);

## License

This library is provided free of charge, under the terms of the [MIT license][9].
This library is provided free of charge, under the terms of the [MIT license][8].


[1]: https://docs.microsoft.com/en-us/dotnet/articles/standard/library
[2]: https://nodatime.org
[3]: http://cldr.unicode.org
[3]: https://cldr.unicode.org
[4]: https://iana.org/time-zones
[5]: https://aka.ms/dstblog
[6]: https://github.com/rails/rails/blob/master/activesupport/lib/active_support/values/time_zone.rb
[7]: https://support.microsoft.com/en-us/help/4051956/time-zone-and-dst-changes-in-windows-for-northern-cyprus-sudan-and-ton
[8]: https://github.com/dotnet/runtime/issues/18644
[9]: https://github.com/mattjohnsonpint/TimeZoneConverter/blob/main/LICENSE.txt
[8]: https://github.com/mattjohnsonpint/TimeZoneConverter/blob/main/LICENSE.txt

0 comments on commit 815c0e2

Please sign in to comment.