Skip to content

Instantly share code, notes, and snippets.

@davidmroth
Created January 11, 2021 03:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davidmroth/daf638678326e52508dca75c246a24e7 to your computer and use it in GitHub Desktop.
Save davidmroth/daf638678326e52508dca75c246a24e7 to your computer and use it in GitHub Desktop.
LEARNDASH EMAIL DATE/TIME FIX
#/home/ampcare/htdocs/wp-content/plugins/learndash-notifications/includes/shortcode.php
# Line number: 106
if ( ! empty( $timezone_string = get_option( 'timezone_string' ) ) ) {
date_default_timezone_set( $timezone_string );
}
#$result = date_i18n( $atts['format'], $completed_on );
if ( ! empty( $timezone_string ) ) {
$result = new DateTime( "@$completed_on" );
$result = date_timezone_set($result, timezone_open( $timezone_string ) );
$result = $result->format( $atts['format'] );
}
else {
$result = date_i18n( $atts['format'], $completed_on );
}
break;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment