Tag [SEC_IN_DAY] shows different results in Studio and on watch

I’m using this formula to calculate Swatch Internet time based on UTC.

@ (numberFormat(“000”,(floor([SEC_IN_DAY]/86.4))))

I set the time zone for the digital clock container for this part of the watch face to London GMT+0, although I tried Dakar Senegal and Accra Ghana first because they do not have DST so I’m told. No matter, the watch face simulator shows the correct value when I use the slider, but a different value when loaded on the watch.

I was expecting [SEC_IN_DAY] to yield the seconds in the day for the time zone selected. Is this not the case?

Can someone suggest an alternate way of doing this?

OK, did some checking on what the other time tags did and then did this:

@ (numberFormat(“000”,(floor(([HOUR_0_23]*3600+[MIN]*60+[SEC])/86.4))))

That gives the expected results.

This is how I have expressed it, roughly, for my Watchy watch and my Fitbit Versa 3. More compact using the Studio tags. The old Versa 3 watch face development tool had a “give me UTC time” function which made me expect one here.

Capture

Have you had a play with the UTC Tag and Modulo yet ?

The only UTC tag I can see is the milliseconds since 1970 type at the top of the tag list.

Didn’t see the modulo selection at all. Where is that?

1 Like

Modulo % is a Maths Operand . It divides a variable and gives you the result . I made a BIEL Mean TIME Face on Facer . There are many ways but this is one . You will obviously recognise some of the numbers.
.
.
((([UTC_TS])/(1000*.864))%100)

I was ignoring [UTC_TS] to begin with since it always increases rather than switching back to zero at the beginning of a new day. I was aware that it starts at midnight though so I might have tried to figure out what you have already found if my current solution didn’t work.

Thanks for the suggestion. I will keep it on file in my Watch Face Studio notes folder along with the article on how to set up my watch for Run on Device.

1 Like