AM/PM tied to a second hour hand

Hi to all
I’m searching some help for an expression/Tag that makes me appear the acronym AM/PM according to the rotation of a small GMT hand, not the main hour hand of the clock.
I attach a very bad example to explain better

In the hour hand of this small dial, that i can move +1h/-1h tapping at 3 and 9, i have inserted the formula
(#DWFKS#+(#VAR_1#*30)). After that i inserted a text field with tag #Da#.
Of course the written AM/PM changes at right time, but…following the main hour hand.
I would need a formula/tag to tie AM/PM to the second small hour hand, not the main hh. Is it possible?
May be someone can help me?
Thanks in advance

1 Like

Mmm, it is not clear to me what your hand is meant to show:
a. the current GMT ( ie. UTC ); or
b. an arbitrary time zone that is set by the user

If it is (a) then you can use the tags #DUK# and #DUm# for that:
rotation: (#DUK#*30+#DUm#*0.5)
AM opacity: $#DUH#<12?100:0$
PM opacity: $#DUH#>=12?100:0$

If it is (b) then again I would use an adjustment to the UTC time not the local time ( that is, the hand would show UTC+{user offset in +/- 1/2 hr increments) ):
rotation: ((#DUK#*30+#DUm#*0.5)+(#VAR_1#*15))
AM opacity: $((#DUH#+#DUm#/60+#VAR_1#*0.5)%24)<12?100:0$
PM opacity: $((#DUH#+#DUm#/60+#VAR_1#*0.5)%24)>=12?100:0$

I hope that helps.

Note: I have not tested the above so please let me know if they do not work :slight_smile:

The easiest way to AM/PM on UTC (GMT) is with this expression in the text field of a text layer:


After that you should be able to use Opacity to show the proper +/- or change the expression to different times for your +/- times.

Thanks @mikeoday & @mrantisocialguy for your help and answers. Talking about Mike solution it works perfectly. just what i wanted. By the way my case is b option.
I tried also the formula of mrantis, but i’m unable to have this formula working. i have inserted the formula in a text field, as he told, i see AM, but do not change to PM rotating the small hand. for sure i have not understood what i must do or what i have to insert in the opacity field. May be you can explain to me better? Sorry, but math is not my bread :smiley:
Here a moke up of my dial
Thank you both for your precious help
Have a nice week end

1 Like

Here is my expression with UTC time all in one text layer in the Text box

Inspection is open so you can play with it. If you use the “Time Machine” at the bottom you will be able to see how it switches at noon and midnight.

1 Like

Thanks again. With your test al is clearer. I will play with it

Good deal, I’m glad it’s more understandable now for you. I’ll leave this up for a week to give you time to play or copy and paste what I’ve done into something you have created to play with.

Thanks again pal. Much appreciated :smiley: