WordPress.org

Ready to get started?Download WordPress

Forums

get_calendar() minor bug (1 post)

  1. priv
    Member
    Posted 8 years ago #

    I have problem login into trac so I post here.

    You can see these two lines in get_calendar():
    $thisyear = gmdate('Y', current_time('timestamp') + get_settings('gmt_offset') * 3600);
    $thismonth = gmdate('m', current_time('timestamp') + get_settings('gmt_offset') * 3600);

    It uses current_time() function, and gmt_offset is already applied in current_time(), so it causes double offset.

    So the calendar might either display next month calendar too soon at 30/31 or still display last month calendar at 1, according to the timezone we set.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags