From 300ec57799e2bdec504ad53bdd3c22eddb77284d Mon Sep 17 00:00:00 2001 From: Aitor Viana Date: Mon, 27 Nov 2023 15:04:45 +0000 Subject: [PATCH] Use ET timezone for vpn cohort (#3930) Task/Issue URL: https://app.asana.com/0/488551667048375/1206034019967211/f ### Description Use ET tz for vpn cohort ### Steps to test this PR _Test_ - [x] fresh install from this branch - [x] enable NetP - [x] verify cohort is set in ET timezone --- .../networkprotection/impl/cohort/NetPCohortUpdater.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/network-protection/network-protection-impl/src/main/java/com/duckduckgo/networkprotection/impl/cohort/NetPCohortUpdater.kt b/network-protection/network-protection-impl/src/main/java/com/duckduckgo/networkprotection/impl/cohort/NetPCohortUpdater.kt index ea390d071c35..c8f63fdceb52 100644 --- a/network-protection/network-protection-impl/src/main/java/com/duckduckgo/networkprotection/impl/cohort/NetPCohortUpdater.kt +++ b/network-protection/network-protection-impl/src/main/java/com/duckduckgo/networkprotection/impl/cohort/NetPCohortUpdater.kt @@ -27,6 +27,7 @@ import javax.inject.Inject import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.launch import org.threeten.bp.LocalDate +import org.threeten.bp.ZoneId @ContributesMultibinding( scope = VpnScope::class, @@ -50,7 +51,7 @@ class NetPCohortUpdater @Inject constructor( fun attemptToSetNetPCohort() { // skip if already stored cohortStore.cohortLocalDate?.let { return } - cohortStore.cohortLocalDate = LocalDate.now() + cohortStore.cohortLocalDate = LocalDate.now(ZoneId.of("America/New_York")) // ET time } coroutineScope.launch(dispatcherProvider.io()) {