From acf2a8fdf3e75abdb659e9d12458a1a4879b250a Mon Sep 17 00:00:00 2001 From: Mark Mann Date: Wed, 28 Jun 2023 02:40:09 -0700 Subject: [PATCH] Fix a flaky test for Darwin converters (#288) Fixes #287 Explicitly format the date in the test with the UTC timezone --- core/darwin/test/ConvertersTest.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/core/darwin/test/ConvertersTest.kt b/core/darwin/test/ConvertersTest.kt index 44c562295..4a5dfea29 100644 --- a/core/darwin/test/ConvertersTest.kt +++ b/core/darwin/test/ConvertersTest.kt @@ -79,6 +79,7 @@ class ConvertersTest { components.timeZone = utc val nsDate = gregorian.dateFromComponents(components)!! val formatter = NSDateFormatter() + formatter.timeZone = utc formatter.dateFormat = "yyyy-MM-dd" assertEquals("2019-02-04", formatter.stringFromDate(nsDate)) }