From 3ce07f069d0fadc15367555666b078ad7b7d3ba5 Mon Sep 17 00:00:00 2001 From: Victor Engmark Date: Thu, 15 Jun 2023 09:49:24 +1200 Subject: [PATCH 1/3] fix: Test time difference with time zone By testing without a time zone, the original test worked differently based on the local time zone of the machine running the test. This is presumably because of a summer time/winter time difference, because changing the date from `2020-10-10` to `2020-05-10` without setting the time zone also makes the test pass on my machine (Pacific/Auckland time zone). --- lib/util/date.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/util/date.spec.ts b/lib/util/date.spec.ts index df5012031209a4..5b67fded4dfd2c 100644 --- a/lib/util/date.spec.ts +++ b/lib/util/date.spec.ts @@ -7,7 +7,7 @@ import { } from './date'; describe('util/date', () => { - const t0 = DateTime.fromISO('2020-10-10'); + const t0 = DateTime.fromISO('2020-10-10', {zone: 'utc'}); beforeAll(() => { jest.useFakeTimers(); From 7ef6e94bc022d8504d30e0d0dd8e59e7b0ee81fe Mon Sep 17 00:00:00 2001 From: Victor Engmark Date: Thu, 15 Jun 2023 17:05:27 +1200 Subject: [PATCH 2/3] fix: Lint code with prettier --- lib/util/date.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/util/date.spec.ts b/lib/util/date.spec.ts index 5b67fded4dfd2c..aa5abd62ec6ccf 100644 --- a/lib/util/date.spec.ts +++ b/lib/util/date.spec.ts @@ -7,7 +7,7 @@ import { } from './date'; describe('util/date', () => { - const t0 = DateTime.fromISO('2020-10-10', {zone: 'utc'}); + const t0 = DateTime.fromISO('2020-10-10', { zone: 'utc' }); beforeAll(() => { jest.useFakeTimers(); From 54e0c030e543b7ebe34a9170990843a1315c67a5 Mon Sep 17 00:00:00 2001 From: Victor Engmark Date: Thu, 15 Jun 2023 17:05:38 +1200 Subject: [PATCH 3/3] docs: Mention how to develop with Nix --- docs/development/local-development.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/development/local-development.md b/docs/development/local-development.md index f2ca1324128c9e..9857221030a5cc 100644 --- a/docs/development/local-development.md +++ b/docs/development/local-development.md @@ -29,6 +29,10 @@ sudo apt-get update sudo apt-get install -y git build-essential nodejs yarn ``` +#### Nix + +To enter a development shell with the necessary packages, run `nix-shell --packages gcc gitFull nodejs yarn`. + #### Windows Follow these steps to set up your development environment on Windows 10.