Stacks 5

My Time

%(topper)%

My time will display your time absolutely anywhere you are able to type something in your page. The stack gives you a macro to type, for example, %(my_time)% which will be replaced by the actual time where you are based when the page is displayed.

Stacks Image 925

Overview

This stack in a nutshell.

My time will allow you to display your time absolutely anywhere a macro like %(my_time)% can be typed in your page.

The stack has what we call a macro. A macro is just a string of text that is unique. You write that macro into any text in any other stack, and the time will be displayed in place of the macro when you preview or publish the page.

You can choose any valid timezone for the time to display, so for example if you live in New York, and you set the New York timezone, then when someone from say Moscow visits the page they see the New York time.

Demo

Live demo of this stack in action.

Current times at the Doobox offices

New York

Office

%(newyork)%

Jersey HQ

Office

%(jersey)%

Mombasa

Office

%(Mombasa)%

Settings

User configurable options.


Mode

Choose between: Server Time or Timezone.

Timezone, the default is going to be the most accurate for everyone. It calls an api to get the time for the timezone you provide. So the time displayed will always be the right time for the locale you picked.

Server Time, pings your server for the local time. This means you do not rely on an external api, but can return an incorrect time. For example: you live in New York, but your website is hosted on a server in Iceland. The time returned would be the time in Iceland. You can quickly see by testing the server time if it will work for your website though. If it returns you're local time then your website is hosted in your locale.

Time zone

The timezone does what it says really, it sets the time to the timezone you provide.

Timezones have a specific format though. You can't just enter "London" for example. That would be Europe/London

You can find a full list of timezones here : https://en.wikipedia.org/wiki/List_of_tz_database_time_zones

Macro

By default the stack comes set to New York time and a default macro string of %(new-york)% A macro is just a string of text, we only place it inside the percent signs and braces to ensure it is unique. It could just as well read "mytime".

To display the time in any text on the page in any other stack, simply write the macro in the text exactly as it appears. You can change the macro to what ever you like. Maybe %(myParisTime)%. Just ensure it contains no spaces, and is unique to the page. You can place the macro in the page as many times as you like, and each one will become the time when you preview or publish.

Show seconds

Checkbox to simply show or hide the seconds counter in the displayed time.

Simplicity by Design.

© Doobox Software

My Time Stack