Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit 291c25f

Browse files
committed
Upgrade to TimeZoneInfo usage so that all builds work and are better.
Microsoft recommends to use TimeZoneInfo instead of TimeZone for all recent versions (starting from 3.5) of the .NET, plus this is the only class available in non-mainstream flavors of .NET (like Silverlight), so why not use it. Also update the assembly version of the SL5 build of ServiceStack.Text.
1 parent 5476693 commit 291c25f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/ServiceStack.Text.SL5/Properties/AssemblyInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@
2121

2222
// The following GUID is for the ID of the typelib if this project is exposed to COM
2323
[assembly: Guid("b058736d-b210-47e1-b16f-ba72d92e7c4e")]
24-
[assembly: AssemblyVersion("3.9.44.0")]
24+
[assembly: AssemblyVersion("3.9.48.0")]

src/ServiceStack.Text/DateTimeExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public static long ToUnixTimeMsAlt(this DateTime dateTime)
4141
return (dateTime.ToStableUniversalTime().Ticks - UnixEpoch) / TimeSpan.TicksPerMillisecond;
4242
}
4343

44-
private static TimeZone LocalTimeZone = TimeZone.CurrentTimeZone;
44+
private static TimeZoneInfo LocalTimeZone = TimeZoneInfo.Local;
4545
public static long ToUnixTimeMs(this DateTime dateTime)
4646
{
4747
var dtUtc = dateTime;

0 commit comments

Comments
 (0)