TimeZoneCalculator

TimeZoneCalculator

Wordpress plugin

Install on Wordpress

App Details

  • based on PHP timezones database (please read the FAQ for further information)
  • fully settings page configurable with GUI or manually
  • easy to integrate (ships with multi/sidebar- and dashboard-widget functionality)
  • display clock in WordPress Admin Bar
  • possible to integrate in “Right Now” box or to display as widget on the dashboard and on the user’s profile page
  • Calculator section in Tools-Menu with individual timezone-selection for every user
  • optional Ajax refresh with jQuery
  • fully compatible with https/SSL/TLS-sites
  • API for developers
  • fully multisite network compatible
  • clean uninstall

Plan your travels with the free JourneyCalculator which is based on TimeZoneCalculator.

Please find the version for WordPress

Plugin’s website: https://www.bernhard-riedl.com/projects/

Author’s website: https://www.bernhard-riedl.com/
Attention! – Geeks’ stuff ahead! 😉

API

With TimeZoneCalculator 2.00 and higher you can also realize a html select which displays for example the airtime of your internet radio station or your broadcasts in your users’ local time. Another possibility for the usage of the upcoming function is the integration of date, time and timezone information into your travelling blog.

Parameters can either be passed as an array or a URL query type string (e.g. “display=0&format=0”). Please note that WordPress parses all arguments as strings, thus booleans have to be 0 or 1 if used in query type strings whereas for arrays real booleans should be used. – Furthermore you have to break your timezones with \n : America/New_York;EST;EWT;New York, NY, US;New York, NY, US;0;0\nEurope/Vienna;;;sleep longer in winter;get up earlier to enjoy the sun;1;0 if you want to use different timezones in a query_string. In case you use an array, an array should also be used for the timezones.

function $timezonecalculator->output($params=array())

$params:

  • query_time: any unix timestamp (where -1262304000 <= query_time <= 2145916800) or any English textual datetime description in the range of 1930-01-01 and 2038-01-01 which can be parsed with PHP’s strtotime function; default is set to current UTC

  • query_timezone: origin-timezone of query_time; you can choose a PHP timezone_string; otherwise UTC will be used

  • before_list: default <ul>

  • after_list: default </ul>

  • format_timezone: default <li><abbr title="%name">%abbreviation</abbr>: <span title="%name">%datetime</span></li>

  • format_datetime: default Y-m-d H:i

  • timezones: alternative timezones-array – each array entry has to be a string as described in the Manual Selection Section of the Admin Menu; default is the timezones-entries array which can be modified in the Admin Menu

  • prefer_user_timezones: prefer user set timezones – if they exist – to global or function call timezones; default is false

  • user_id: determines which user’s timezones should be used; not set as default -> use the timezones of the user who is currently logged in

  • use_container: if set to true (default value), the current UTC is used as query_time and the same selected timezones and format is used as set in the admin menu, TimeZoneCalculator wraps the output in a html div with the class timezonecalculator-refreshable-output – the class timezonecalculator-output will be used for all other output; if you set use_container to false, no container div will be generated

  • display: if you want to return the timezone-information (e.g. for storing in a variable) instead of echoing it with this function-call, set this to false; default setting is true

  • format_container: This option can be used to format the div container with css. Please note, that it should only be used to provide individual formats in case the class-style itself cannot be changed.

  • no_refresh: If set to true, TimeZoneCalculator will not produce any Ajax-Refresh-code, even if you have enabled the Ajax refresh in the admin menu.

Example for including a world-clock in your post-template (usually single.php or post.php in wp-content/themes) using WordPress the_date() function:

Find something similar to

the_date(); 

or

the_time(); 

and replace it with

<?php $timezonecalculator->output(array('query_time' => the_date('U', '', '', false))); ?> 

This outputs your selected timezones, whereas calculations are based on the timestamp of your post instead of using the current UTC.

Shortcodes

How-to for shortcodes

General Example:

Enter the following text anywhere in a post or page to inform the clan when to meet up again:

let's meet tomorrow for a new challenge at: [timezonecalculator_output query_time="tomorrow 8pm" query_timezone="Europe/Vienna" timezones="Europe/Vienna\nAsia/Bangkok"] 

Available Shortcode:

timezonecalculator_output 

Invokes $timezonecalculator->output($params). Please note that you have to use a query_string to select timezones which can be parsed into an associative array. – For example: America/New_York;EST;EWT;New York, NY, US;New York, NY, US;0;0\nEurope/Vienna;;;sleep longer in winter;get up earlier to enjoy the sun;1;0

Filters

How-To for filters

Available Filters:

timezonecalculator_defaults 

In case you want to set the default parameters globally rather than handing them over on every function call, you can add the filter timezonecalculator_defaults in for example timezonecalculator.php or your own customization plugin (recommended).

Please note that parameters which you hand over to a function call ($timezonecalculator->output) will always override the defaults parameters, even if they have been set by a filter or in the admin menu.

timezonecalculator_dashboard_widget 

Receives an array which is used for the dashboard-widget-function call to $timezonecalculator->output($params). display and use_container will automatically be set to true.

timezonecalculator_dashboard_right_now 

Receives an array which is used for the right-now-box-function call to $timezonecalculator->output($params). display and use_container will automatically be set to true.

timezonecalculator_world_clock_tools_page 

Receives an array which is used for the world-clock-function call on the tools-page to $timezonecalculator->output($params). display, use_container and prefer_user_timezones will automatically be set to true.

timezonecalculator_user_profile 

Receives an array which is used for the user-profile-function call to $timezonecalculator->output($params). display, use_container and prefer_user_timezones will automatically be set to true.

timezonecalculator_admin_bar_clock 

Receives an array which is used for the admin-bar-clock-function call to $timezonecalculator->output($params). display will automatically be set to false and use_container to true. Moreover, the timezones will be set to Local_WordPress_Time. The filter timezonecalculator_admin_bar_clock_format_container will be used as default format for the clock.

timezonecalculator_admin_bar_clock_format_container 

Receives a string which represents the container style.

timezonecalculator_admin_bar_clock_position 

Position of the clock in the Admin Bar (see wp-includes/class-wp-admin-bar.php function add_menus). Default is 1000 which is the last position.

timezonecalculator_calculator 

Receives an array which is used for the calculator-page function call to $timezonecalculator->output($params). display, use_container will automatically be set to true.

timezonecalculator_calculator_timezone 

Receives a timezone-string which is used for the calculator-page.

timezonecalculator_calculator_format_date 

Receives an array whereas each entry represents a date-format. The first date-format will be used as display-format in the textfield.

timezonecalculator_calculator_format_time 

Receives a string which is used to determine whether to use 12 or 24-hour clock. In case this string contains a or A, the 12-hour clock will be preferred.

Pricing

Starting from $0 per month.

Check Out the Logo Slider Widget

By Common Ninja

Logo SliderTry For Free!

App Info

Rating

Reviewers

3 reviews

Tags

calendar
date
time
timezone
world clock

Developed By

Bernhard Riedl

Quick & Easy

Find the Best Wordpress plugins for you

Common Ninja has a large selection of powerful Wordpress plugins that are easy to use, fully customizable, mobile-friendly and rich with features — so be sure to check them out!

Testimonial

Testimonial plugins for Wordpress

Galleries

Galleries plugins for Wordpress

SEO

SEO plugins for Wordpress

Contact Form

Contact Form plugins for Wordpress

Forms

Forms plugins for Wordpress

Social Feeds

Social Feeds plugins for Wordpress

Social Sharing

Social Sharing plugins for Wordpress

Events Calendar

Events Calendar plugins for Wordpress

Sliders

Sliders plugins for Wordpress

Analytics

Analytics plugins for Wordpress

Reviews

Reviews plugins for Wordpress

Comments

Comments plugins for Wordpress

Portfolio

Portfolio plugins for Wordpress

Maps

Maps plugins for Wordpress

Security

Security plugins for Wordpress

Translation

Translation plugins for Wordpress

Ads

Ads plugins for Wordpress

Video Player

Video Player plugins for Wordpress

Music Player

Music Player plugins for Wordpress

Backup

Backup plugins for Wordpress

Privacy

Privacy plugins for Wordpress

Optimize

Optimize plugins for Wordpress

Chat

Chat plugins for Wordpress

Countdown

Countdown plugins for Wordpress

Email Marketing

Email Marketing plugins for Wordpress

Tabs

Tabs plugins for Wordpress

Membership

Membership plugins for Wordpress

popup

popup plugins for Wordpress

SiteMap

SiteMap plugins for Wordpress

Payment

Payment plugins for Wordpress

Coming Soon

Coming Soon plugins for Wordpress

Ecommerce

Ecommerce plugins for Wordpress

Customer Support

Customer Support plugins for Wordpress

Inventory

Inventory plugins for Wordpress

Video Player

Video Player plugins for Wordpress

Testimonials

Testimonials plugins for Wordpress

Tabs

Tabs plugins for Wordpress

Social Sharing

Social Sharing plugins for Wordpress

Social Feeds

Social Feeds plugins for Wordpress

Slider

Slider plugins for Wordpress

Reviews

Reviews plugins for Wordpress

Portfolio

Portfolio plugins for Wordpress

Membership

Membership plugins for Wordpress

Forms

Forms plugins for Wordpress

Events Calendar

Events Calendar plugins for Wordpress

Contact

Contact plugins for Wordpress

Comments

Comments plugins for Wordpress

Analytics

Analytics plugins for Wordpress

Common Ninja Apps

Some of the best Common Ninja plugins for Wordpress

Browse our extensive collection of compatible plugins, and easily embed them on any website, blog, online store, e-commerce platform, or site builder.

Logo Slider for Wordpress logo

Logo Slider

Add a logo slider to your site to showcase clients and partners, strengthen brand credibility, and build trust with new visitors.

Collapsible Content for Wordpress logo

Collapsible Content

Use Collapsible Content sections to structure information on your site and make it easier for visitors to find what they need.

Company Branch Flip Cards for Wordpress logo

Company Branch Flip Cards

Display locations with company branch flip cards that help customers find nearby offices, understand key details, and enjoy a smoother overall experience.

Quiz Maker for Wordpress logo

Quiz Maker

Create interactive quizzes with a quiz maker that lets you build custom questions, collect responses, and increase engagement with easy site integration.

Leaderboard for Wordpress logo

Leaderboard

Add a customizable leaderboard to your site to display rankings, track scores, and encourage friendly competition.

AdBlocker Detector for Wordpress logo

AdBlocker Detector

Detect ad blockers on your site to maintain visibility into user behavior and support sustainable ad-based monetization.

Event Flip Cards for Wordpress logo

Event Flip Cards

Use event flip cards to highlight upcoming activities, improve visibility, and help visitors discover events that increase attendance and engagement.

Highlighted Headlines for Wordpress logo

Highlighted Headlines

Enhance titles with highlighted headlines that use custom colors, animations, and styles to draw attention and help visitors notice key messages.

PayPal Button for Wordpress logo

PayPal Button

Offer customers a trusted way to pay using PayPal through a PayPal Button that reduces checkout friction and supports higher sales.

Right Click Protection for Wordpress logo

Right Click Protection

Use right click protection to prevent copying by disabling right click actions, protecting your content and reducing unauthorized reuse on your site.

Glossary for Wordpress logo

Glossary

Create an interactive glossary that displays clear definitions, images, and search options to help visitors learn terms quickly and navigate complex topics with ease.

Countdown to Download for Wordpress logo

Countdown to Download

Use a countdown to download widget that reveals files after the timer ends, builds anticipation, and guides visitors toward higher engagement.

Discover Apps By Platform

Discover the best apps for your website

WordPress
Wix
Shopify
Weebly
Webflow
Joomla
PrestaShop
Shift4Shop
WebsiteX5
MODX
Opencart
NopCommerce

Common Ninja Search Engine

The Common Ninja Search Engine platform helps website builders find the best site widgets, apps, plugins, tools, add-ons, and extensions! Compatible with all major website building platforms - big or small - and updated regularly, our Search Engine tool provides you with the business tools your site needs!

Multiple platforms