Make WordPress Core

Opened 5 years ago

Closed 5 years ago

#48830 closed defect (bug) (wontfix)

Shipping Labels with wrong time 8 hours ahead

Reported by: cbddotmarket's profile cbddotmarket Owned by:
Milestone: Priority: normal
Severity: normal Version: 5.3
Component: Date/Time Keywords: reporter-feedback
Focuses: Cc:

Description

I was concerned with the printing timestamp on mailing labels through WooCommerce Services. The sticker turns out to be in UTC, although the real time for printing the PDT is Los Angeles. The time in the WordPress General settings is correct – the time zone of Los Angeles. Time on the server is also set correctly – it’s PDT. But after printing a mailing label and tracking through USPS, it is clear that the time is 8 hours later indicated – that is, in the future: https://tools.usps.com/go/TrackConfirmAction_input?qtc_tLabels1=9400136897846113727648

Change History (4)

#1 @Otto42
5 years ago

Time on the server is also set correctly – it’s PDT.

The server time should be UTC.

#2 @Rarst
5 years ago

Could you please check that code you use does not call date_default_timezone_set() to change default PHP time zone from UTC?

So far all the issues with slipping time with 5.3 had been caused by that. It's not supported by core and unfortunately some things broke in a different way with 5.3 as side effect of work to resolve these issues.

The server time should be UTC.

Doesn't matter, core boot always discards and sets PHP time zone explicitly to UTC.

#3 @Rarst
5 years ago

  • Keywords reporter-feedback added

#4 @Rarst
5 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed

5.3.1 had shipped a "PHP default timezone" check in Tools > Site Health, that simplifies diagnosing that issue.

Unless OP confirms that their issue is definitely different, this isn't directly actionable and will be handled over time in continued progress of making core insensitive to PHP time zone changes (the next step is getting rid of strtotime() in core).

Note: See TracTickets for help on using tickets.