[wp-trac] [WordPress Trac] #57035: Error in current_time() function when using timestamp and no value for gmt_offset

WordPress Trac noreply at wordpress.org
Wed Jul 10 14:29:31 UTC 2024


#57035: Error in current_time() function when using timestamp and no value for
gmt_offset
-------------------------------------------------+-------------------------
 Reporter:  Nick_theGeek                         |       Owner:
                                                 |  hellofromTonya
     Type:  defect (bug)                         |      Status:  assigned
 Priority:  normal                               |   Milestone:  6.7
Component:  Date/Time                            |     Version:  5.3
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch has-unit-tests php80 dev-  |     Focuses:
  feedback changes-requested                     |
-------------------------------------------------+-------------------------
Changes (by hellofromTonya):

 * keywords:  has-patch has-unit-tests php80 dev-feedback => has-patch has-
     unit-tests php80 dev-feedback changes-requested
 * owner:  audrasjb => hellofromTonya
 * status:  reopened => assigned
 * milestone:  Future Release => 6.7


Comment:

 Given a solution was reverted, I'm thinking this area needs a deeper
 contextual dive as well as consideration and testing to raise confidence
 of no side effects or regressions being introduced. It'll also need more
 test coverage (happy and unhappy paths).

 The challenges:
 * robust solution to handle all timezones include partial hour timezones.
 >The `gmt_offset` can be a float/double for partial-hour timezones such as
 +5:30 UTC for India and Sri Lanka.
 * review of what values `gmt_offset` should and could have.
 * and cross-version compatibility for the PHP versions WP supports.

 I'm also curious of how this is solved in other projects.

 Pulling it into 6.7 and self-assigning with intent to help shepherd the
 effort for this ticket and #58986.

 Also marking the current patches as `changes-requested` as there's more
 work to do. That said, I'm yet convinced any of the patches are the way
 forward. I think that's the place to start -> figure out the way forward
 and then build a patch for it.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/57035#comment:39>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list