Installation
- Navigate to the Add New sub-page under the Plugins admin page.
- Search for
Connections Business Directory Local Time
. - The plugin should be listed first in the search results.
- Click the Install Now link.
- Click the Activate Plugin link to activate the plugin.
- Create a Google Maps Server key and enable the Google Maps Time Zone API.
- Add the Local Time widget to your theme’s sidebar.
Google Maps Time Zone API
The local time is calculated from the latitude/longitude of either the first or preferred address from the entry. The latitude/longitude is used to determine time zone in which the address is located using the Google Maps Time Zone API.
Since the Google Maps Time Zone API is being utilized you will need an API key. Please read our tutorial on how to get a Google Maps API key.
Follow the instructions for configuring a Server Key. The one important difference when following the tutorial is that you must also enable the Google Maps Time Zone API.
Widget
To display the clock for an entry you must place the widget in the theme’s sidebar. The clock will only be displayed when viewing the entry’s single entry profile view.
Title
The widget title.
Display Title
Whether or not to display the widget title
Choose Skin
The skin to use when displaying the analog clock.
Display Time Zone
Whether or not to display the time zone name above the clock
Display Date
Whether or not to display the local date.
Display Analog Clock
Whether or not to display the analog clock.
Display Digital Clock
Whether or not to display the digital clock.
Time Format
Below is a table of valid time formating options which can be utilized to display the time in your desired format.
The default is: hh:mm A
Format | Example | |
---|---|---|
HH |
24-hour format of an hour with leading zeros | 00 through 23 |
hh |
12-hour format of an hour with leading zeros | 01 through 12 |
H |
24-hour format of an hour without leading zeros | 0 through 23 |
h |
12-hour format of an hour without leading zeros | 1 through 12 |
mm |
Minutes with leading zeros | 00 to 59 |
m |
Minutes without leading zeros | 0 to 59 |
ss |
Seconds with leading zeros | 00 to 59 |
s |
Seconds without leading zeros | 0 to 59 |
a |
Lowercase Ante meridiem and Post meridiem | am or pm |
A |
Uppercase Ante meridiem and Post meridiem | AM or PM |
SSS |
Milliseconds with leading zeros | 000 through 999 |
S |
Milliseconds without leading zeros | 0 through 999 |
Z |
Difference to Greenwich time (GMT) in hours. | +0200 or -0400 |
'NO ''FORMAT'' HERE' |
The specified string within the single quotes printed literally. To escape a single quote, you must prepend it with another single quote. | NO 'FORMAT' HERE |
Date Format
Below is a table of valid time formating options which can be utilized to display the date in your desired format.
The default is : MM/DD/YYYY
Format | Example | |
---|---|---|
YYYY |
A full numeric representation of a year, 4 digits | 2017 |
YY |
A two digit representation of a year | 17 |
MMMM |
A full textual representation of a month | January through December |
MMM |
A short textual representation of a month, three letters | Jan through Dec |
MM |
Numeric representation of a month, with leading zeros | 01 through 12 |
M |
Numeric representation of a month, without leading zeros | 1 through 12 |
DDDD |
A full textual representation of the day of the week | Sunday through Saturday |
DDD |
A textual representation of a day, three letters | Sun through Sat |
DD |
Day of the month, 2 digits with leading zeros | 01 to 31 |
D |
Day of the month without leading zeros | 1 to 31 |
'NO ''FORMAT'' HERE' |
The specified string within the single quotes printed literally. To escape a single quote, you must prepend it with another single quote. | 'NO 'FORMAT' HERE' |