Support » Theme: Smart Magazine » Time and date

  • Hello
    I have a small question about how to change the language and date, and why is not the time used by the WP engine?
    And how to change the timezone, because when my midnight is not changing the date?
    date

Viewing 3 replies - 1 through 3 (of 3 total)
  • Theme Author Qaiser

    (@kais99)

    Hi,
    Standard PHP Date function has been used to display date which uses server’s time zone. I agree I would be better to use timezone from WP settings.
    Please replace line 27 in header.php (<div class=”topdate”><?php echo date(‘l, jS F Y’); ?>) with below
    <div class="topdate"><?php echo current_time('l, jS F Y'); ?>

    You can read more about current_time here.

    I would add this in next update release.

    Thanks,

    Thanks, it works
    but I can not set my language

    • This reply was modified 1 year, 2 months ago by  ciepan.

    Can I replace:
    <div class="topdate"><?php echo current_time('l, jS F Y'); ?>
    Something like this:
    <div class="topdate"><?php echo esc_html( date_i18n(get_option( 'date_format' )) ); ?>
    ?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Time and date’ is closed to new replies.