Skip to content

Date.fromNowByDay.daysAgo fails after timezone change when run in US timezone #243192

@a-stewart

Description

@a-stewart

The Date.fromNowByDay.daysAgo test in src/vs/base/test/common/date.test.ts is failing for me since the timezone change in the US. I think because this time 5 days ago is 4 days and 23 hours ago.

(Our work computers run tests in the US for some reason.)

I think potentially setting the test to run 5 days ago - 2 hours, might be a safer option for a more reliable test?

Verifying that 5 days, 2 hours ago says "5 days ago" is correct. And this will vary between 5 days, 3 hours and 5 days, 1 hour as the clocks move backwards and forwards.

At present, it varies between 5 days 1 hour, and 4 days 23 hours, which results in the failures I am seeing.

Metadata

Metadata

Assignees

Labels

insiders-releasedPatch has been released in VS Code Insiders

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions