diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-07-12 14:43:41 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-07-12 14:43:41 +0700 |
commit | 1d98bc30564dd3e691403e54f05de87927a90053 (patch) | |
tree | 93d18ecaa3a88b91c67c39377934b978a5ed2b8a /crypto/src/util/date/DateTimeUtilities.cs | |
parent | Cleanup doc warnings (diff) | |
download | BouncyCastle.NET-ed25519-1d98bc30564dd3e691403e54f05de87927a90053.tar.xz |
Make explicitly UTC
Diffstat (limited to 'crypto/src/util/date/DateTimeUtilities.cs')
-rw-r--r-- | crypto/src/util/date/DateTimeUtilities.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/src/util/date/DateTimeUtilities.cs b/crypto/src/util/date/DateTimeUtilities.cs index 311ad5d37..72e5123a2 100644 --- a/crypto/src/util/date/DateTimeUtilities.cs +++ b/crypto/src/util/date/DateTimeUtilities.cs @@ -4,7 +4,7 @@ namespace Org.BouncyCastle.Utilities.Date { public class DateTimeUtilities { - public static readonly DateTime UnixEpoch = new DateTime(1970, 1, 1); + public static readonly DateTime UnixEpoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc); private DateTimeUtilities() { @@ -33,7 +33,7 @@ namespace Org.BouncyCastle.Utilities.Date public static DateTime UnixMsToDateTime( long unixMs) { - return new DateTime(unixMs * TimeSpan.TicksPerMillisecond + UnixEpoch.Ticks); + return new DateTime(unixMs * TimeSpan.TicksPerMillisecond + UnixEpoch.Ticks, DateTimeKind.Utc); } /// <summary> |