C#时间跨度转换矩产生不同的结果

时间:2019-01-12 16:02:13

标签: c# c#-4.0 momentjs moment-timezone

TimeSpan dayDuration = new TimeSpan(23,59,59);
            var x =dayDuration.Subtract(new TimeSpan(23, 59, 59)).Subtract(Convert.ToDateTime("2019-02-01 18:00").TimeOfDay);


            Console.WriteLine(dayDuration);
            Console.WriteLine(x);
            Console.ReadLine();

此Timespan如何产生o / p:如-18:00:00 但是当我在js

 let dayDuration ="23:59:59";
dayDuration = moment(moment("HH:mm:ss").diff(moment("2019-02-01 18:00","HH:mm:ss"))).utc().format("HH:mm:ss");

哪个会产生o.p,如05:59:59:我现在需要C#o / p

0 个答案:

没有答案