Pourquoi les fonctions temporelles affichent un fuseau horaire non valide lors de l'utilisation du format de temps «C»?

wordpress.stackexchange https://wordpress.stackexchange.com/questions/54700

Question

Ce sont les fonctions que j'utilise dans mon thème pour afficher le "entry-meta" qui comprend publié et Dernière modifié Dates (entre autres) d'un article:

// Shows Author and Published Date
if ( ! function_exists( 'reddle_posted_on' ) ) :
function reddle_posted_on() {
    printf( __( '<span class="byline">Posted by <span class="author vcard"><a class="url fn n" href="%5$s" title="%6$s" rel="author">%7$s</a></span></span><span class="sep"> &mdash; </span><span class="entry-date"><time datetime="%3$s" pubdate>%4$s</time></span>', 'reddle' ),
        esc_url( get_permalink() ),
        esc_attr( get_the_time() ),
        esc_attr( get_the_date( 'c' ) ),
        esc_html( get_the_date() ),
        esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
        sprintf( esc_attr__( 'View all posts by %s', 'the-wolf' ), get_the_author() ),
        esc_html( get_the_author() )
    );
}
endif;

// Shows Last Modified Date
if ( ! function_exists( 'reddle_last_modified_on' ) ) :
function reddle_last_modified_on() {
    printf( __( 'Last updated on <time class="updated" itemprop="dateModified" datetime="%2$s">%3$s</time>', 'reddle' ),
        esc_attr( get_the_modified_time() ),
        esc_attr( get_the_modified_date( 'c' ) ),
        esc_html( get_the_modified_date( 'F j, Y ~ H:i' ) )
    );
}
endif;

Voyez-vous quelque chose de mal à ces fonctions? Le problème est, malgré la définition du fuseau horaire de mon blog sur GMT-05:00 (-04: 00 DST) Tableau de bord WordPress> Paramètres> Général L'horodatage qui est la sortie montre GMT+00:00. Une idée pourquoi?

Pas de solution correcte

Licencié sous: CC-BY-SA avec attribution
Non affilié à wordpress.stackexchange
scroll top