From f8850073cd3f8f6c1fb412b57e63838a536d6bfe Mon Sep 17 00:00:00 2001 From: Tsanie Date: Fri, 6 Aug 2021 17:25:29 +0800 Subject: [PATCH] fix issue about timing convert. --- Gallery.Util/Extensions.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gallery.Util/Extensions.cs b/Gallery.Util/Extensions.cs index 498297d..65579cd 100644 --- a/Gallery.Util/Extensions.cs +++ b/Gallery.Util/Extensions.cs @@ -99,13 +99,13 @@ namespace Gallery.Util public static DateTime ToLocalTime(this long time) { //return new DateTime(1970, 1, 1, 0, 0, 0).AddMilliseconds(time).ToLocalTime(); - return new DateTime(621355968000000000L + time * 10000).ToLocalTime(); + return new DateTime(621355968000000000L + time * 10000000).ToLocalTime(); } public static long ToTimestamp(this DateTime datetime) { var ticks = datetime.Ticks; - return (ticks - 621355968000000000L) / 10000; + return (ticks - 621355968000000000L) / 10000000; } } }