Formulae for the equation of time, local solar time and daylight savings

I will have a go, it will need to make use of the some of the formulae above; if you get a chance it would be great if you could let me know if they work for you and what your timezone is.

I assume the Sun is on a transparent layer all by itself, is that right?

Very cool watch face by the way :+1::+1::+1:

That would be great! Yes, the sun is on a transparent layer. I have as well a centered version.

1 Like

How exactly can i test your formulae? I don‘t own a sundial…,

My timezone is utc +1, i am living in germany.

But we have summertime/wintertime.

1 Like

Can‘t load the watch face for testing, i get the comment „Unpublished“ when i try to send to the smartwatch.

1 Like

Thanks for trying to test my formulae. And yes, I was not expecting you to have a sundial :slight_smile: - I was hoping it would be possible to load the watch and just see if the numbers made sense ( mean time was near midday, daylight savings is correct, etc. ). I’m not sure it is possible to test it without loading it though. Again thanks for trying.

I will look at your function today.

Cheers
Mike

1 Like

This seems to work …

Set rotation to:

($(#DWFHS#/15)>=(#WRH#+(#WRm#/60))&&(#DWFHS#/15)<=(#WSH#+(#WSm#/60))?(75-(((#DWFHS#/15)-(#WRH#+(#WRm#/60)))*(((2 * 75)/((#WSH#+(#WSm#/60))-(#WRH#+(#WRm#/60))))))):180$)

Where:

Sunset and sunrise occur +/- 75 degrees from vertical. If you have a different daylight window arc, replace 75 in the formula above with whatever it is. If you find that the sun appears or disappears abruptly at sunrise or sunset, then increase the value for window size in the formula slightly until the sun gracefully appears/disappears ( that is, try, 76, 77, 78, or whatever )

1 Like

Wow! Awesome! This seems to do the trick. Not tested on the smart watch but i assume it will work fine.

Thanks a lot!

Did you maybe found a trick for the fading sundown/sunrise light effects? The ones i am using are only working in the creator and do silly things on the smart watch.

My formulae:

Sunrise

Starting one hour before sunrise (pink light)
$(#DH#+1)=(#WRH#)?((#Dm#+1)(100/60)):$$(#DH#+1)=(#WRH#+1)?(100-(#Dm#(100/60))):0$

Starting with sunrise (orange light)
$(#DH#)=(#WRH#)?((#Dm#)(100/60)):$$(#DH#)=(#WRH#+1)?(100-(#Dm#(100/60))):0$

Sunset
Starting one hour before sunset (orange light)
$(#DH#+1)=(#WSH#)?((#Dm#+1)(100/60)):$$(#DH#+1)=(#WSH#+1)?(100-(#Dm#(100/60))):0$

Starting with sunset, fadeout 1 h after sunset (pink light)
$(#DH#)=(#WSH#)?((#Dm#)(100/60)):$$(#DH#)=(#WSH#+1)?(100-(#Dm#(100/60))):0$

Maybe you have an idea how to manage…?

Greetings, GAUSS.

2 Likes

You are most welcome :slight_smile:

You might try the following for transparency:

Sunrise:

One hour transition duration ( 0 to 100 and back to 0 ) with start time Sunrise - 1hr:
(($(#DH#+#Dm#/60)>=(#WRH#+(#WRm#/60)-1)&&(#DH#+#Dm#/60)<=(#WRH#+(#WRm#/60)+0)?(100-(100abs(2((#DH#+#Dm#/60)-(#WRH#+(#WRm#/60)))+1))):0$))

Two hour transition, start time Sunrise - 1hr:
(($(#DH#+#Dm#/60)>=(#WRH#+(#WRm#/60)-1)&&(#DH#+#Dm#/60)<=(#WRH#+(#WRm#/60)+1)?(100-(100*abs((#DH#+#Dm#/60)-(#WRH#+(#WRm#/60))-0))):0$))

One hour transition, start time Sunrise:
(($(#DH#+#Dm#/60)>=(#WRH#+(#WRm#/60)-0)&&(#DH#+#Dm#/60)<=(#WRH#+(#WRm#/60)+1)?(100-(100abs(2((#DH#+#Dm#/60)-(#WRH#+(#WRm#/60)))-1))):0$))

Sunset:

One hour transition, start time Sunset -1:
(($(#DH#+#Dm#/60)>=(#WSH#+(#WSm#/60)-1)&&(#DH#+#Dm#/60)<=(#WSH#+(#WSm#/60)-0)?(100-(100abs(2((#DH#+#Dm#/60)-(#WSH#+(#WSm#/60)))+1))):0$))

Two hour transition, start time Sunset -1:
(($(#DH#+#Dm#/60)>=(#WSH#+(#WSm#/60)-1)&&(#DH#+#Dm#/60)<=(#WSH#+(#WSm#/60)+1)?(100-(100*abs((#DH#+#Dm#/60)-(#WSH#+(#WSm#/60))-0))):0$))

One hour transition, start time Sunset:
(($(#DH#+#Dm#/60)>=(#WSH#+(#WSm#/60)-0)&&(#DH#+#Dm#/60)<=(#WSH#+(#WSm#/60)+1)?(100-(100abs(2((#DH#+#Dm#/60)-(#WSH#+(#WSm#/60)))-1))):0$))

They seem to work ok …

Cheers
Mike

By the way, is it possible to have more than one IF THEN ELSE on a line - I thought it was a syntax error?

Well, its not my formula and i am not very good in programming but i wondered as well.

Your transparency formulae are awesome. Didn´t test on the watch yet but they already work fabulous in Creator. I made totally new pictures and the effect is astounding.

The effects are made with a douzend of layers for sky background, landscape color, backlight and cloud illumination

Thanks again for your great help, for sure i will mention your participation when i publish the final result. Without you, the day/night simulation wouldn´t exist.

It´s now done and you should have a closer look at the final result:

Greetings, GAUSS.

2 Likes

That is fantastic, what a wonderful imagination you must have to come up with your ideas; that plus the great skills to realise them - well done!

Thank you very much. I indeed have a lot of pictures and ideas in my head, lol. But as i said, my weak point is programming and mathematics, that’s why i am so thankful for your help.

1 Like

I am replying to this thread, since I was interested in knowing when DST (daylight saving time, Summer Time) is. Reason being, to rotate a 24 city Bezel, but not wanting it to rotate by the UTC-offset.

If I am located in Berlin, then the Bezel should point to “BER” and not “CAI” in summer. My time may change but not my physical zone.

Somehow @mikeoday’s formula did not work for me. So I took a different approach and basically use opacity to overlay the winter bezel with a summer bezel with the Timezone tag #Dz#.

So when it is daylight savings time, the value should be 100, when the following timezones are true:

$#Dz#=ACDT?100:$$#Dz#=ADT?100:$$#Dz#=AEDT?100:$$#Dz#=AKDT?100:$$#Dz#=AMST?100:$$#Dz#=AZOST?100:$$#Dz#=BRST?100:$$#Dz#=CDT?100:$$#Dz#=CDT?100:$$#Dz#=CEST?100:$$#Dz#=CHADT?100:$$#Dz#=CHOST?100:$$#Dz#=CLST?100:$$#Dz#=COST?100:$$#Dz#=EASST?100:$$#Dz#=EDT?100:$$#Dz#=EEST?100:$$#Dz#=EGST?100:$$#Dz#=FKST?100:$$#Dz#=HDT?100:$$#Dz#=HOVST?100:$$#Dz#=IRDT?100:$$#Dz#=LHST?100:$$#Dz#=MDT?100:$$#Dz#=MEST?100:$$#Dz#=NDT?100:$$#Dz#=NZDT?100:$$#Dz#=PDT?100:$$#Dz#=PMDT?100:$$#Dz#=PYST?100:$$#Dz#=SDT?100:$$#Dz#=UYST?100:$$#Dz#=WAST?100:$$#Dz#=WEST?100:$$#Dz#=WGST?100:$

Winter rotation Bezel: (((#DOFST#/60)*15))
Summer rotation Bezel: (((#DOFST#/60)*15)+15)

Bezel:

Watch face (Bezel is off by 15°…):

Related threads:

4 Likes

Wow great work Tom . I did not play at all with the Offset . I always wondered if it changed on the Correct Day but of course it must do . I wonder where you got your list of Zones from . I guess it sorts out the Brazil problem and the Half hour Zones .

2 Likes

It’s fantastic, You definitely merit the titel Master Tom!

1 Like

Sorry I was trying to post this on my phone . I am not sur what to do with the opacity formulas . I obviously put them on bot layers but i am not sure if they are for the summer or the winter . Sorry to be so thick .
.
.

1 Like

Unfortunately the long DST formula does not like a value when the conditions are not met. Normally it should be something like:
$#Dz#=CEST?100:0$

But the “:0” does not seem to work, had to remove the “0”. So opacity does not work as expected.

So what I did was to have the “winter” bezel at opacity 100, and the summer bezel on a layer above, with that long formula above for opacity. I also needed a background to cover the winter bezel, since the bezel is text only. An Arc with the same opacity as the bezel could do.

I opened up inspection of the watch face…

2 Likes

Yeah . Thanks Tom I looked at your Publication . I see your Dual Strategy . I was just getting there with a Blanking ring . Sadly i get the Zone Abbreviation on creator but the zones don t show so it has to go on the watch to show . Great Work . I know where to find a Master Class . Just follow you about .
Yes . In those multi conditional lines you can not have anything after the ELSE colon : .
.
.


2 Likes

looks like I missed BST…
but seems to be used for Bangladesh standard time too…

This my source list of time zone abbreviations: here

2 Likes

OK Thanks . As you see BST works on my watch . I wondered if you pulled the Zone list out of the JAVA .
I just wonder how you decided which ones to include . I guess the Data comes from Open Weather .