You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have an issue in the RemoteAttacher date logic regarding timezones - it's calculating with local time rather than UTC, and what that timezone is depends on the server in question. Ideally need to switch the date handling in RemoteAttacher to use UTC for everything (DateTime.UtcNow not DateTime.Now in C#, GETUTCDATE() not GETDATE() on MS SQL, UTC_DATE() not DATE() on Oracle...)
This means CI occasionally fails depending on the time of day - the Github VMs are on Pacific time IIRC, so about one-third of the time the local date is a day behind the UTC date, causing an off-by-one which breaks those unit tests.
Not the first bit of RDMP to hit this; there's some older code that spent a while with a "Do not run this test late at night" label on it since it would fail for similar reasons between 11pm and midnight UK time six months of the year...
Past, but not always far enough in the past - "2 days ago" sometimes becomes "1 day ago" and causes the time window tests to fail ("expected 2 rows but got 3"). It showed up on the Dependabot PR for Microsoft.Test.Sdk, then they passed when manually re-run a few hours later, because "now" was the same date for both timezones.
Maybe I'll try a specific test for that with a time/date just before and after midnight to catch it reliably.
We have an issue in the RemoteAttacher date logic regarding timezones - it's calculating with local time rather than UTC, and what that timezone is depends on the server in question. Ideally need to switch the date handling in RemoteAttacher to use UTC for everything (
DateTime.UtcNow
notDateTime.Now
in C#,GETUTCDATE()
notGETDATE()
on MS SQL,UTC_DATE()
notDATE()
on Oracle...)This means CI occasionally fails depending on the time of day - the Github VMs are on Pacific time IIRC, so about one-third of the time the local date is a day behind the UTC date, causing an off-by-one which breaks those unit tests.
Not the first bit of RDMP to hit this; there's some older code that spent a while with a "Do not run this test late at night" label on it since it would fail for similar reasons between 11pm and midnight UK time six months of the year...
Originally posted by @jas88 in #1838 (comment)
The text was updated successfully, but these errors were encountered: