Local Time
Place a clock on your Confluence page showing the date and time of the current user.
Last updated
Place a clock on your Confluence page showing the date and time of the current user.
Last updated
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.
https://github.com/glewe/confluence-user-macros/tree/master/src/local-time
Create a Confluence user macro for each *.vtl file and paste the *.vtl code.
With this check box on you can display the user’s date before the time display.
With this check box on you can display the user’s weekday before the time display.
The time display refreshes itself. It works like a running clock. With this setting you can specify the refresh rate, e.g. 1000 for every second or 60000 for every minute.
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.
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.
You can select the font weight of the time display here, “normal”, “bold” or “inherit”.
The default is “inherit” which uses the Confluence default.
You can select the font style of the time display here, “normal”, “italic” or “inherit”.
The default is “inherit” which uses the Confluence default.
Here is your chance to increase the size of the font. Enter the relative 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.
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.
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.
You might like a border around the time display. Check this box if you want one.
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.
In case you want to display a fixed timezone instead of the user’s local time, check this box.
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.
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.