Skip to content

Commit 6991413

Browse files
authored
Use timezone-aware campaign start time (#438)
DT_Campaign_Fuel::date_of_campaign_day now uses DT_Time_Utilities::start_of_campaign_with_timezone($campaign['ID']) instead of reading $campaign['start_date']['timestamp'] directly. This makes campaign day calculations respect the campaign's timezone and avoids incorrect day offsets when the campaign timezone differs from the server timezone.
1 parent 1b4e40b commit 6991413

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

classes/dt-campaign-fuel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public static function total_days_in_campaign( $selected_campaign = null ): int
7474
public static function date_of_campaign_day( int $day ) {
7575
$porch_fields = DT_Porch_Settings::settings();
7676
$campaign = DT_Campaign_Landing_Settings::get_campaign();
77-
$campaign_start_time = $campaign['start_date']['timestamp'];
77+
$campaign_start_time = DT_Time_Utilities::start_of_campaign_with_timezone( $campaign['ID'] );
7878

7979
$internal = DAY_IN_SECONDS;
8080
if ( $porch_fields['prayer_fuel_frequency']['value'] === 'weekly' ) {

0 commit comments

Comments
 (0)