Make WordPress Core

Opened 2 months ago

Closed 8 weeks ago

#47842 closed feature request (fixed)

Site health info tab in WordPress Panel, there should be Time Zone and UTC offset.

Reported by: artisticasad Owned by: SergeyBiryukov
Milestone: 5.3 Priority: normal
Severity: minor Version: 5.2
Component: Site Health Keywords: has-screenshots has-patch
Focuses: Cc:
PR Number:


If we add timezone and UTC offset in Site health WordPress panel it would be very beneficial for the user and the person debugging certain issue for site when he has no direct access to site i.e plugin developers

The user normally does not know timezone for the WordPress which is used to set corn jobs in plugin/s e.g in scheduling like plugin. For plugin developers it would be awesome to get time zone info if provided there.

Screenshot: https://api.monosnap.com/file/download?id=GtMpDySVRm4GRmMgBS2aO5zEAIeUN7

Attachments (4)

#47842.patch (923 bytes) - added by justinahinon 2 months ago.
#47842.2.patch (1.7 KB) - added by sharaz 2 months ago.
#47842.3 (1004 bytes) - added by justinahinon 8 weeks ago.
#47842.3.patch (1004 bytes) - added by justinahinon 8 weeks ago.
Good patch file

Download all attachments as: .zip

Change History (11)

#1 @mukesh27
2 months ago

  • Summary changed from Site health info tab in WordPress Pane, there should be Time Zone and UTC offset. to Site health info tab in WordPress Panel, there should be Time Zone and UTC offset.
  • Version changed from 5.2.2 to 5.2

#2 @justinahinon
2 months ago

  • Keywords has-patch added; needs-patch removed
  • Severity changed from normal to minor

Hello @artisticasad and welcome to WordPress Core Trac.
I also found useful to have some infos about the sites in the site health info panel.

However having both (timezone and UTC offset) of them may be redundant in my opinion. And in some cases, WordPress is not able to get the two informations.

When for instance you choose in General > Settings UTC - 6 for the timezone, the timezone string option (US/Eastern) for instance stay empty in the database. WordPress stores this timezone string in the database only if you choose a city for the timezone option. And it also stores the timezone offset that comes with the city.

I have written a quick patch that adds the time offset line in the site health info panel.

#3 @sharaz
2 months ago

@artisticasad Welcome to the trac.

@justinahinon Yes, only UTC Offset enough to show site time zone if we show timezone and offset it will be redundant. But some issue in your patch

  1. If we install fresh WP instance no timezone set your patch show.

Site Time Offset: UTC +

  1. If offset is negative like UTC-6 patch show.

Site Time Offset: UTC +-6

  1. If offset is UTC+5:15 or 5:30,5:45 patch show.

Site Time Offset: UTC+5.25 or 5.5 and 5.75

I have solved these issues will add the new patch.

Last edited 2 months ago by sharaz (previous) (diff)

2 months ago

#4 @justinahinon
8 weeks ago

wp_timezone() and wp_timezone_string() have recently been introduced in WordPress trunk in [45853], and they simplify and harmonize timezone management in WordPress.

I've used it to rewrite a new slightly updated patch.

8 weeks ago

8 weeks ago

Good patch file

#5 @SergeyBiryukov
8 weeks ago

  • Milestone changed from Awaiting Review to 5.3
  • Owner set to SergeyBiryukov
  • Status changed from new to reviewing

#6 @Rarst
8 weeks ago

I would drop option check / UTC prepend, whole point of new API is to get rid of checking options. :) Offset string is pretty self-explanatory, there are no other bases in practice offset can refer to.

#7 @SergeyBiryukov
8 weeks ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 45889:

Site Health: Add timezone to Site Health Info page.

Props justinahinon, sharaz, artisticasad, Rarst.
Fixes #47842.

Note: See TracTickets for help on using tickets.