From a5e86bfb775658f5f4d38b44836eb01a46adb191 Mon Sep 17 00:00:00 2001 From: aminecmi Date: Mon, 26 Dec 2022 11:28:04 +0100 Subject: [PATCH] Date format issues. --- .drone.yml | 3 +++ androidApp/src/test/kotlin/DatesTest.kt | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 4c06464..23e1e84 100644 --- a/.drone.yml +++ b/.drone.yml @@ -17,6 +17,7 @@ steps: - echo "---------------------------------------------------------" - ./gradlew koverMergedXmlReport environment: + TZ: Europe/Paris SONAR_HOST_URL: from_secret: sonarScannerHostUrl SONAR_LOGIN: @@ -50,6 +51,7 @@ steps: - git remote add pushing https://$GITEA_USR:$GITEA_PASS@gitea.amine-louveau.fr/Louvorg/ReaderForSelfoss-multiplatform.git - git push pushing --tags environment: + TZ: Europe/Paris GITEA_USR: from_secret: giteaUsr GITEA_PASS: @@ -117,6 +119,7 @@ steps: - echo "Verify" - $ANDROID_HOME/build-tools/31.0.0/apksigner verify signed.apk environment: + TZ: Europe/Paris YOUR_KEYSTORE_PASSWORD: from_secret: keyPass YOUR_KEY_ALIAS: diff --git a/androidApp/src/test/kotlin/DatesTest.kt b/androidApp/src/test/kotlin/DatesTest.kt index 7751c99..3f373d4 100644 --- a/androidApp/src/test/kotlin/DatesTest.kt +++ b/androidApp/src/test/kotlin/DatesTest.kt @@ -16,7 +16,9 @@ class DatesTest { @Test fun v3_date_should_be_parsed() { val date = DateUtils.parseDate(v3Date) - val expected = LocalDateTime(2013, 4, 7, 13, 43, 0, 0).toInstant(TimeZone.of("UTC+1")) .toEpochMilliseconds() + val expected = + LocalDateTime(2013, 4, 7, 14, 43, 0, 0).toInstant(TimeZone.currentSystemDefault()) + .toEpochMilliseconds() assertEquals(date, expected) }