Confluence Local Time Macro

The Confluence Local Time Macro is a simple but useful macro allowing you to place a clock on your page showing the date and time of the current user viewing your page or showing a fixed timezone.

What is Confluence ?

Confluence ChartJS MacroI happen to be involved in the administration and operation of Atlassian applications. Confluence is Atlassian’s awesome Enterprise Wiki. I you haven’t heard of or used it yet, check it out. You can download a trial version right from their web site here: https://www.atlassian.com/software/confluence.

What is a Confluence User Macro ?

If you run your own Confluence instance you can, as an administrator, create custom “User Macros”, little scripts that can be included in pages creating content on the fly. With those macros you can create simple HTML code as well as utilize Velocity code accessing information from your Confluence database.

I will not address the basics of writing a user macro here. That is well documented in the Confluence documenation here.

Confluence Local Time Macro Screenshot

Confluence Local Time Macro

Options

Confluence Local Time Macro

Show Date

With this check box on you can display the user’s date before the time display.

Show Weekday

With this check box on you can display the user’s weekday before the time display.

Refresh Time

The time display refreshes itself. It worls like a running clock. With this setting you can specify the refresh rate, e.g. 1000 for every second or 60000 for every minute.

Font

You can enter any font here that is installed on your computer. For Windows users this could be “Arial”, “Calibri” or “Segoe UI” to name just three. You may want to open your Windows’ Control Panel and select “Fonts” to see what you have installed. Other operating systems will have a similar function to view your available fonts.

Here is the string attached though. When you chose a font that your computer can display, that might not be so on other users’ computers that don’t have the font installed on their system. So don’t go exotic on this.

You can, however, list several fonts separated by comma. What that will do is something like “If you can’t find the first font, try the second.” and so on. So for example, if you enter “Segoe UI, Arial, Helvetica”, the user’s computer will use Arial if Segoe UI is not available and Helvetica if Arial is neither.

And there is a safety net if none of the fonts is found, the “Font Family” setting (see below).

If you enter “inherit”, the Confluence default font will be used.

Font Family

If none of the fonts you select is found on the end user’s computer, this is your safety net for at least specifying whether to use a serif font or a non-serif (sans-serif) one. If none of the specific fonts is found on the computer and you selected “sans-serif” in the Style list box, it will use the default sans-serif on that computer. There always is one. That also goes for “serif”.

The default is “inherit” which uses the Confluence default.

Font Weight

You can select the font weight of the time display here, “normal”, “bold” or “inherit”.

The default is “inherit” which uses the Confluence default.

Font Style

You can select the font style of the time display here, “normal”, “italic” or “inherit”.

The default is “inherit” which uses the Confluence default.

Font Size

Here is your chance to increase the size of the font. Enter the realtive size by which you want to increase or decrease the font size, e.g. 0.8 = 20% smaller, 1 = normal, 1.2 = 20% bigger.

Try “1.2” and see how that works for you. Play around with that value if you are not satisfied.

If you enter “inherit”, the Confluence default size will be used.

Text Color

You can also change the text color of the time display. The color needs to be entered in hex code, something like #ffcc99. If you enter “inherit”, the Confluence default color will be used.

Background Color

You can also change the background color of the time display. Do it here. See above for how to get the appropriate value for your favorite color. The color needs to be entered in hex code, something like #ffcc99.

Show Border

You might like a border around the time display. Check this box if you want one.

Border Color

This setting only has an effect if you select “Show Border”. You can specify the color of that border here. See above for how to get the appropriate value for your favorite color. The color needs to be entered in hex code, something like #ffcc99.

Fixed Timezone

In case you want to display a fixed timezone instead of the user’s local time, check this box.

GMT Offset

In case you are displaying a fixed timezone, enter the appropriate GMT offset in hours here, e.g. +2 or -5.5. This setting only has an effect in combination with Fixed Timezone on.

Timezone

You can optionally add a text describing the timezone, e.g. a city name. It will be displayed in brackets behind the time. This setting only has an effect in combination with Fixed Timezone on.

Macro Code

Show code...
Your Rating
software image
Author Rating
1star1star1star1stargray
Aggregate Rating
4.5 based on 2 votes
Software Name
Confluence Local Time Macro
Operating System
Confluence
Software Category
Add-ons
Price
EUR 0
Landing Page