WordPress plugin intelligence profile

WP User Timezone

WP User Timezone displays the front-end dates & times in the browser's local timezone without actually modifying your database.

WP PlugIndex snapshot

Current directory snapshot

Tested up to WordPress 4.5
Current version1.0.2
WordPress coverageTested up to WordPress 4.5
Minimum stackWP 3.0.1 · PHP —
Directory statusactive
Last directory update7 May 201610y ago
Active installations10Adoption metric — not a quality score
WordPress.org rating3.0 / 5 from 4 ratings
Official packageDirect from WordPress.org

Repository metrics are context, not quality scores. Active installations measure adoption and can strongly reflect a plugin’s age and historical popularity. Ratings, recent updates and “Tested up to” metadata also do not guarantee modern code, error-free operation, security, feature completeness or suitability for a particular site. Why active installs don’t tell the whole story →

WP PlugIndex currently records WP User Timezone version 1.0.2 as active, updated 10y ago and tested up to WordPress 4.5.

Overview

About this plugin

WordPress has a site-level timezone setting configured from the admin back-end. All dates and times displayed on the front-end are typically displayed in this timezone.

This plugin enables the display of dates/times in the front-end using the browser’s timezone. This is done by overriding the WordPress’s ‘timezone_string’ and ‘gmt_offset’ options to match the user’s timezone for the duration of a particular request

ONLY on the front-end interface.

Browser Timezone Detection

The browser’s timezone is detected using one of the following two methods

  • jsTimezoneDetect (default)
  • HTML5 Geolocation API and Google Timezone API

jsTimezoneDetect (default)

This is the default timezone detection mechanism. Please refer to the script home page

for the compatibility and other notes

HTML5 Geolocation API

getCurrentPosition. The location thus detected will be sent to the Google Timezone API

which returns the timezone id – similar to “Asia/Kolkata”.

This method requires you to

  • Enable the “Google Timezone API” option on the plugin options page
  • Specify a valid Google API Key
  • The key should be a browser key
  • The “Accepted HTTP Referrers” should include the domain name used by the hosting wordpress site or left blank to allow all referrers

If the required options for the usage of Google Timezone API are not met, the detection mechanism falls back to the default one.

Post Timezone Detection

  • If the browser’s timezone id is not detected successfully, everything else behaves as if this plugin is not installed.
  • If the browser’s timezone id is detected, the following actions take place
  • A cookie will be set in the browser, based on the cookie options specified on the plugin options page
  • If a cookie already exists previously with the same id, no action is taken
  • If a cookie doesn’t already exist previously or exists with a different timezone id, then a window.reload is triggered to refresh the page so that the dates/times on the page are updated

EventON Hook

This plugin provides a feature to hook into the EventON plugin. When enabled, all EventON dates/times are updated to reflect the browser’s timezone.

Shortcodes

This plugin defines the below shortcodes

  • [wp_user_timezone_id] => Returns the timezone id of the browser or null if not available.
  • [wp_user_timezone_offset] => Returns the timezone’s gmt offset in hours of the browser or null if not available.

Options

This plugin defines the below options to retrieve the original timezone_string and gmt_offset defined at the site level

  • get_option( ‘site_timezone_string’ ) => Returns the original timezone_string option for the site
  • get_option( ‘site_gmt_offset’ ) => Returns the original gmt_offset option for the site

Actions/Hooks

This plugin defines the below filters/hooks

  • apply_filters( ‘wp_user_timezone_id’, $tz_id ) => Allows you to override the timezone string determined by the plugin. This filter can be used to apply user’s timezone preference. If any plugin or wordpress core implements a feature to accept and store user’s preferred timezone, the ‘wp_user_timezone_id’ can be used to apply that timezone value to the front-end. Reference: Add user-level timezone setting ).

Admin Backend Dates/Times

Important: The admin back-end is not modified by this plugin. All dates/times displayed in the back-end are still in the original timezone specified by the WordPress General Settings.

WordPress.org metadata

Plugin tags

Topics listed for this plugin in the WordPress.org directory.

  • date
  • time
  • timezone
Compatibility & maintenance

Compatibility & maintenance

Tested up to WordPress 4.5

Not yet marked as tested with WordPress 7.1. WordPress.org currently lists Tested up to 4.5.

Current WordPress releaseWordPress 7.1
WordPress.org Tested up to4.5
Minimum requirementsWordPress 3.0.1 · PHP not listed
Update activity7 May 201610y ago

“Tested up to” is directory metadata supplied by the plugin author. WP PlugIndex does not turn an older declaration into a claim that the plugin is incompatible.

Changes recorded by WP PlugIndex

Recent tracked changes

No tracked version or compatibility changes have been recorded by WP PlugIndex yet.

Tracking & source

WP PlugIndex tracks public WordPress.org directory metadata and records selected version, compatibility and availability changes as they are detected.

Plugin watchlist

Watch this plugin

Sign in to your WP PlugIndex account or create a free account. Free accounts can watch up to 5 plugins and see what changed.

Watch limit

Watchlist limit reached

You have reached your current active watch limit.