Functional digital clock in Hype

Years ago, as an amateur screen printer, I printed this wall clock based on Leonardo da Vinci's Vitruvius Man. The indicated time is about a quarter to eleven.

Now I have made a version for the iPad, Mac, iPhone etc. in Hype. The two figures rotate randomly, but how nice would it be if they also indicated the correct time like my little clock.
Is there an existing script for a clock or should I invent it myself, which of course I will never succeed.

Have a look at this post. Everything you need, I guess...

1 Like

It's almost unbelievable, I post a question, go to bed and when I wake up I see the answer to my question! Only now my poor HTLM knowledge is paying off. I normally substitute parts of a complicated idea on the forum and it works great after a week of trying it out: jazzkoe
Unfortunately, my luck is failing me now because it may be a little too complicated for me. This is what I made of it, but it doesn't work. Is help still possible? I replaced everything except the second hand, because with that I can check if the clock is working:

1 Like

The issue is that this clock works by obtaining the time zone it works with from the symbols id
Simply give the symbol an id that is a time zone i.e


Screenshot 2023-08-15 at 19.41.04

The other time zones can be found heree .

Also just realised you have not set the hour and minute hand class names and left the old ones in.

Also need the two Leonardo's and second hand placement repositioned to rotate correctly from a shared center point.

I will pm you a fixed version

I also changed the time zone ref to use the Additional Html Attributes instead of id
This line in the code changed

h = today.toLocaleString('en-GB', {hour: '2-digit', hour12: false, timeZone: window[].id })


h = today.toLocaleString('en-GB', {hour: '2-digit', hour12: false, timeZone: window[].dataset.timezone })

And the symbol given it time zone

Screenshot 2023-08-15 at 20.23.08



With the very expert help of Mark Hunte, this seventy-six-year-old former art teacher managed to create a clock as a variation of Leonardo da Vinci's Vitrivius Man, as he described it in his "De architectura" of about 1490. Of course, I couldn't resist adding some humor to it. I fear that many other variations will follow. Mark thanks immensely for your help and patience!


Hahah, that's very funny,
Well done.


Years ago I visited the Vitra showroom in the German town of Weil. There were Macs in several places at the time, all running under Windows. Very nice then was a screensaver with a clock by George Nelson. Upon request, this screensaver was later sent to me, but unfortunately only for Windows. Recently I recreated the clock in Hype and this was possible thanks to the help I received in creating my Leonardo clock.
Is it possible to make a working screensaver of this too, but for the Mac? (MacOS Sonoma)
Thanks for your suggestions.

1 Like

I assume you mean an official macOS screensaver? You'd need to have a screensaver that shows a web view. Doing a quick google search, I found this project that looks like it is intended for this sort of thing:

There might be other projects similar to it.

If you want to actually publicize/deploy it with a single package, it is probably a bit more involved since you'd need to ship with a specific configuration/web page in mind and then also probably code sign the screen saver, or so I would guess.


Thank you very much Jonathan!

1 Like

I forgot to mention that it totally worked out with Homebrew and WebViewScreenSaver. This allows me to use any website I want as a screensaver.
Best regards,


Oh great, I'm glad that you were able to get that to work!