Closed Ablu closed 5 years ago
Interesting... The Appveyor build fails when comparing new Date()
with the current DateTime from C#... Locally it works. I will try to see what goes wrong there...
@spahnke would be cool if you could check whether the tests make sense. Date stuff is always ugly... :/.
@oliverbock should work now :)
somehow github did not handle my forced push to my branch...
Ok. A second forced push fixed it
I will review this on Monday.
CI failure is an unrelated test
Calling
ToLocalTime()
leads to changes of the hour component. Since in JavaScript Date is basically simply a number starting from 1970-01-01 UTC we should not do any conversions here. This also means that the test which simply checked thatnew Date(2010, 9, 10)
equalsnew DateTime(2010, 10, 10)
was wrong. C# does not do any conversions by default, sonew DateTime(2010, 10, 10)
does not specificy any timezone. The JavaScript code should match the UTC Date of 2010-10-10 (00:00:00) converted to the local timezone, for example, 2010-10-09 (22:00:00) for MESZ (GMT+2).