Divi WordPress Theme
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

WordPress fix Timezone UTC Offset vs City

Discussion in 'Misc WordPress Requests' started by WordPress.org Forums », Jan 11, 2018.

  1. WordPress.org Forums »

    Guest

    Timezone UTC Offset vs City, by

    When I have my timezone offset set to a city the UTC time is incorrect.

    Chicago
    Universal time (UTC) is 2018-01-11 17:25:17. Local time is 2018-01-11 11:25:17.

    and php echo will return
    current_time( ‘mysql’ ) returns local site time: 2018-01-11 17:25:14
    current_time( ‘mysql’, 1 ) returns GMT: 2018-01-11 23:25:14
    current_time( ‘timestamp’ ) returns local site time: 2018-01-11 11:25:14
    current_time( ‘timestamp’, 1 ) returns GMT: 2018-01-11 17:25:14

    But when the timezone offset is set to a UTC offset the results are correct.
    UTC-6
    Universal time (UTC) is 2018-01-11 23:27:12. Local time is 2018-01-11 17:27:12.
    current_time( ‘mysql’ ) returns local site time: 2018-01-11 17:27:09
    current_time( ‘mysql’, 1 ) returns GMT: 2018-01-11 23:27:09
    current_time( ‘timestamp’ ) returns local site time: 2018-01-11 17:27:09
    current_time( ‘timestamp’, 1 ) returns GMT: 2018-01-11 23:27:09

    In my cPanel PHP Options I have this setting

    date.timezone: America/New_York

    Is this a bug? Or an error in my theme/plugins.

    I did de-activate my plugins and switched to the 2016 Theme and the issue still existed.

    Timezone UTC Offset vs City
     
    #1

Share This Page

Monarch Social Sharing Plugin