Skip to content

Commit 56f63c3

Browse files
authored
gw-format-date-merge-tags.php: Fixed issue where date was converted to WordPress' configured timezone.
1 parent 76950d3 commit 56f63c3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gravity-forms/gw-format-date-merge-tags.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public function replace_merge_tags( $text, $form, $entry, $url_encode, $esc_html
7676
$timestamp = strtotime( sprintf( '%d-%d-%d', $parsed_date['year'], $parsed_date['month'], $parsed_date['day'] ) );
7777

7878
// phpcs:ignore WordPress.DateTime.RestrictedFunctions.date_date
79-
$replace = wp_date( $modifier, $timestamp );
79+
$replace = wp_date( $modifier, $timestamp, new DateTimeZone( 'UTC' ) );
8080

8181
$text = str_replace( $match[0], $replace, $text );
8282
}

0 commit comments

Comments
 (0)