From 1d98bc30564dd3e691403e54f05de87927a90053 Mon Sep 17 00:00:00 2001 From: Peter Dettman Date: Tue, 12 Jul 2022 14:43:41 +0700 Subject: Make explicitly UTC --- crypto/src/util/date/DateTimeUtilities.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crypto') 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); } /// -- cgit 1.4.1