It is currently March 29th, 2024, 12:02 pm

Clock face based on the sunset and sunrise

Get help with creating, editing & fixing problems with skins
the1ulike
Posts: 34
Joined: June 13th, 2020, 7:55 pm

Clock face based on the sunset and sunrise

Post by the1ulike »

Hi there,
I'm a beginner here. I want to make a skin for my desktop computer to have the clocks in different parts of the worlds.
request to change the face of the clock automatically based on the sunrise and sunset so the face will be dark in night and light in the day. Same as in attached
Please help me with the code, I don't know which ULR could be used for this and how to set the locations
You do not have the required permissions to view the files attached to this post.
Last edited by the1ulike on June 20th, 2020, 2:04 pm, edited 1 time in total.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Clock face based on the sunset and sunrise

Post by jsmorley »

I don't want to discourage you, but this is actually pretty complicated. First, you have to find the current time for each location you want, then you need to get the sunrise and sunset times for each location, then you can compare the two and use !SetOption to change the color of some meter(s).

A good place to start parsing might be https://www.timeanddate.com.

That's about the best I can do to point you in the right direction, as this is just a bigger and more complicated project than I want to take on at this time.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5384
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Clock face based on the sunset and sunrise

Post by eclectic-tech »

This can be simplified if you use a site provided by Yandex; http://time.yandex.com

As an example of what can be obtained open this link of info for Los Angeles CA in your browser:
http://time.yandex.com/sync.json?lang=en&geo=200
It will return this JSON info that can be parsed:
yandexJSON0.png

This same URL can be used with a variable as the geo={value} to obtain time for multiple cities around the world. The geoID for a city can be obtained by going to http://time.yandex.com, adding a city, clicking the "Gear" icon for that city, then looking at the "Informer" info.
yandexJSON2.png
As an example, here are the measures I use in my "WorldTimeH" skin from "Dynamic" to access the site and parse the info for 1 location. It includes a value telling you if it is night (StringIndex=4).

Code: Select all

[Variables]
Location1=200
;Los Angeles

; Location1
[MeasureName1]
Measure=Plugin
Plugin=Plugins\WebParser.dll
UpdateRate=600
Url="http://time.yandex.com/sync.json?lang=en&geo=#Location1#"
Debug=1
RegExp="(?siU).*"name":"(.*)".*"offset":(.*),"offsetString":"(.*)".*,"isNight":(.*),"
StringIndex=1
DecodeCharacterReference=1
DynamicVariables=1
Substitute="":"Updating..."
FinishAction=[!EnableMeasure MeasureName2][!UpdateMeasure MeasureName2]
; Each location WebParser measure is disabled on load. Then each is enabled, when the previous one is finished. 
; This prevents multiple WebParser measure from running simultaneously, which could lock up the WebParser.dll
 
[MeasureOffset1]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureName1]
StringIndex=2
Substitute="":"0"

[MeasureOffsetString1]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureName1]
StringIndex=3
Substitute="UTC":"GMT"

[MeasureDay1]
Measure=Time
Format=%a 
TimeZone=([MeasureOffset1]/3600000)
DaylightSavingTime=0
FormatLocale=local
DynamicVariables=1

[MeasureTime1]
Measure=Time
TimeZone=([MeasureOffset1]/3600000)
DaylightSavingTime=0
FormatLocale=local
DynamicVariables=1

[MeasureTimeFormatted1]
Measure=Time
Format=%#I:%M
TimeZone=([MeasureOffset1]/3600000)
DaylightSavingTime=0
FormatLocale=local
DynamicVariables=1

[MeasureAMPM1]
Measure=Time
Format=%p
TimeZone=([MeasureOffset1]/3600000)
DaylightSavingTime=0
FormatLocale=local
DynamicVariables=1

[MeasureIsNight1]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureName1]
StringIndex=4
Substitute="true":"Night","false":"Day"
DynamicVariables=1

; ...
; Replace with your meters
[MeterDummy]
Meter=String
; ...
yandexJSON1.png
As mentioned, this is not a simple task, but hopefully this info may help you get closer to your desired result. :)
Feel free to ak questions if you need to...
You do not have the required permissions to view the files attached to this post.
the1ulike
Posts: 34
Joined: June 13th, 2020, 7:55 pm

Re: Clock face based on the sunset and sunrise

Post by the1ulike »

eclectic-tech wrote: June 15th, 2020, 2:25 am This can be simplified if you use a site provided by Yandex; http://time.yandex.com

As an example of what can be obtained open this link of info for Los Angeles CA in your browser:
http://time.yandex.com/sync.json?lang=en&geo=200
It will return this JSON info that can be parsed:yandexJSON0.png


This same URL can be used with a variable as the geo={value} to obtain time for multiple cities around the world. The geoID for a city can be obtained by going to http://time.yandex.com, adding a city, clicking the "Gear" icon for that city, then looking at the "Informer" info. yandexJSON2.png

As an example, here are the measures I use in my "WorldTimeH" skin from "Dynamic" to access the site and parse the info for 1 location. It includes a value telling you if it is night (StringIndex=4).

Code: Select all

[Variables]
Location1=200
;Los Angeles

; Location1
[MeasureName1]
Measure=Plugin
Plugin=Plugins\WebParser.dll
UpdateRate=600
Url="http://time.yandex.com/sync.json?lang=en&geo=#Location1#"
Debug=1
RegExp="(?siU).*"name":"(.*)".*"offset":(.*),"offsetString":"(.*)".*,"isNight":(.*),"
StringIndex=1
DecodeCharacterReference=1
DynamicVariables=1
Substitute="":"Updating..."
FinishAction=[!EnableMeasure MeasureName2][!UpdateMeasure MeasureName2]
; Each location WebParser measure is disabled on load. Then each is enabled, when the previous one is finished. 
; This prevents multiple WebParser measure from running simultaneously, which could lock up the WebParser.dll
 
[MeasureOffset1]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureName1]
StringIndex=2
Substitute="":"0"

[MeasureOffsetString1]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureName1]
StringIndex=3
Substitute="UTC":"GMT"

[MeasureDay1]
Measure=Time
Format=%a 
TimeZone=([MeasureOffset1]/3600000)
DaylightSavingTime=0
FormatLocale=local
DynamicVariables=1

[MeasureTime1]
Measure=Time
TimeZone=([MeasureOffset1]/3600000)
DaylightSavingTime=0
FormatLocale=local
DynamicVariables=1

[MeasureTimeFormatted1]
Measure=Time
Format=%#I:%M
TimeZone=([MeasureOffset1]/3600000)
DaylightSavingTime=0
FormatLocale=local
DynamicVariables=1

[MeasureAMPM1]
Measure=Time
Format=%p
TimeZone=([MeasureOffset1]/3600000)
DaylightSavingTime=0
FormatLocale=local
DynamicVariables=1

[MeasureIsNight1]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureName1]
StringIndex=4
Substitute="true":"Night","false":"Day"
DynamicVariables=1

; ...
; Replace with your meters
[MeterDummy]
Meter=String
; ...
yandexJSON1.png

As mentioned, this is not a simple task, but hopefully this info may help you get closer to your desired result. :)
Feel free to ak questions if you need to...
Thank you very much for the reply, as I mentioned I'm just a beginner. Please bear with me
I'm trying to use IfCondition= (HourUtil >= 6) && (HourUtil <= 18) for estimating the time 6am as sunrise and 6pm for sunset.
how can I implement your measure with my code:

Code: Select all

[Variables]

;gTZ=-4
;gTZName=Michigan

[MeasureTime]
Timezone=#gTZ#
Measure=Time

[Month]
Measure=Time
Timezone=#gTZ#
*Format=%b %d
Format=%d %b

[Year]
Measure=Time
Format=%Y

[Clock]
Timezone=#gTZ#
Measure=Time
Format=%p

[MeasureSeconds]
Measure=Time
Format=%S

[MeasureDayName]
Measure=Time
Timezone=#gTZ#
Format=%A

[MeasureTime]
Timezone=#gTZ#
Measure=Time

[HourUtil]
Timezone=#gTZ#
Measure=Time
Format=%#H

===================================================================
; METERS
*********************************************************************************************

[MeterClockFaceN]
Meter=Image
ImageName=#@#Images\N.png
PreserveAspectRatio=1
X=0
Y=0
W=220
H=250

[MeterClockFaceD]
Meter=Image
ImageName=#@#Images\D.png
PreserveAspectRatio=1
X=0
Y=0
W=220
H=250

[MeasureClockFace]
Measure=Time
Format=%#H
IfCondition= (HourUtil >= 6) && (HourUtil <= 18)
IfTrueAction=!ShowMeter MeterClockFaceD
IfFalseAction=!HideMeter MeterClockFaceD

**********************************************************************************
[MeterDigitalTimeN]
Meter=String
StringStyle=Bold
;StringEffect=Shadow
FontColor=250,250,250
AntiAlias=1
MeasureName=Clock
StringAlign=CenterCenter
X=110
Y=218
FontSize=12
Text=%1 

[MeterDigitalTime]
Meter=String
StringStyle=Bold
;StringEffect=Shadow
FontColor=10,10,10
AntiAlias=1
MeasureName=Clock
StringAlign=CenterCenter
X=110
Y=218
FontSize=12
Text=%1 


[MeasureDigitalTime]
Measure=Time
Format=%#H
IfCondition= (HourUtil >= 6) && (HourUtil <= 18)
IfTrueAction=!ShowMeter MeterDigitalTime
IfFalseAction=!HideMeter MeterDigitalTime

*********************************************************************************************

[MeterDigitalDayOfWeekN]
Meter=String
StringStyle=Bold
StringCase=Upper
FontFace=Century
AntiAlias=1
MeasureName=MeasureDayName
StringAlign=CenterCenter
X=111
Y=150
FontSize=10
FontColor=255,255,255
Text=%1

[MeterDigitalDayOfWeek]
Meter=String
StringStyle=Bold
StringCase=Upper
FontFace=Century
AntiAlias=1
MeasureName=MeasureDayName
StringAlign=CenterCenter
X=111
Y=150
FontSize=10
FontColor=0,0,0
Text=%1

[MeasureDigitalDayOfWeek]
Measure=Time
Format=%#H
IfCondition= (HourUtil >= 6) && (HourUtil <= 18)
IfTrueAction=!ShowMeter MeterDigitalDayOfWeek
IfFalseAction=!HideMeter MeterDigitalDayOfWeek

*********************************************************************************************

[MeterDigitalDateN]
Meter=String
StringStyle=Bold
StringCase=Upper
FontColor=255,255,255
FontFace=Century
AntiAlias=1
MeasureName=Month
MeasureName2=Year

StringAlign=CenterCenter
X=111
Y=165
FontSize=10
Text=%1 %2

[MeterDigitalDate]
Meter=String
StringStyle=Bold
StringCase=Upper
FontColor=0,0,0
FontFace=Century
AntiAlias=1
MeasureName=Month
MeasureName2=Year

StringAlign=CenterCenter
X=111
Y=165
FontSize=10
Text=%1 %2

[MeasureDigitalDate]
Measure=Time
Format=%#H
IfCondition= (HourUtil >= 6) && (HourUtil <= 18)
IfTrueAction=!ShowMeter MeterDigitalDate
IfFalseAction=!HideMeter MeterDigitalDate

*********************************************************************************************

[MeterTZDisplayN]
Meter=String
StringStyle=Bold
StringCase=Upper
FontColor=255,255,255
;FontFace=#dFont#
AntiAlias=1
;MeasureName=MeasureTime
StringAlign=CenterCenter
X=111
Y=95
FontSize=11
Text=#gTZname#

[MeterTZDisplay]
Meter=String
StringStyle=Bold
StringCase=Upper
FontColor=0,0,0
;FontFace=#dFont#
AntiAlias=1
;MeasureName=MeasureTime
StringAlign=CenterCenter
X=111
Y=95
FontSize=11
Text=#gTZname#

[MeasureTZDisplay]
Measure=Time
Format=%#H
IfCondition= (HourUtil >= 6) && (HourUtil <= 18)
IfTrueAction=!ShowMeter MeterTZDisplay
IfFalseAction=!HideMeter MeterTZDisplay

;************************************Clock Hands ********************************************

[MeterHrHandN]
Meter=ROUNDLINE
MeasureName=MeasureTime
X=0
Y=20
W=220
H=220
LineLength=40
LineColor=240,240,240
LineWidth=11
AntiAlias=1
StartAngle=4.7124
RotationAngle=6.2832
ValueRemainder=43200



[MeterHrHand]
Meter=ROUNDLINE
MeasureName=MeasureTime
X=0
Y=20
W=220
H=220
LineLength=40
LineColor=0,0,0
LineWidth=11
AntiAlias=1
StartAngle=4.7124
RotationAngle=6.2832
ValueRemainder=43200

[MeasureHrHand]
Measure=Time
Format=%#H
IfCondition= (HourUtil >= 6) && (HourUtil <= 18)
IfTrueAction=!ShowMeter MeterHrHand
IfFalseAction=!HideMeter MeterHrHand

********************************************************************************************

[MeterHrHand2N]
Meter=ROUNDLINE
MeasureName=MeasureTime
X=0
Y=20
W=220
H=220
LineStart=43
LineLength=46
LineColor=240,240,240
LineWidth=9
AntiAlias=1
StartAngle=4.7124
RotationAngle=6.2832
ValueRemainder=43200


[MeterHrHand2]
Meter=ROUNDLINE
MeasureName=MeasureTime
X=0
Y=20
W=220
H=220
LineStart=43
LineLength=46
LineColor=0,0,0
LineWidth=9
AntiAlias=1
StartAngle=4.7124
RotationAngle=6.2832
ValueRemainder=43200


[MeasureHrHand2]
Measure=Time
Format=%#H
IfCondition= (HourUtil >= 6) && (HourUtil <= 18)
IfTrueAction=!ShowMeter MeterHrHand2
IfFalseAction=!HideMeter MeterHrHand2

*********************************************************************************************

[MeterHrHand3N]
Meter=ROUNDLINE
MeasureName=MeasureTime
X=0
Y=20
W=220
H=220
LineStart= 49
LineLength=51
lineColor=240,240,240
LineWidth=7
AntiAlias=1
StartAngle=4.7124
RotationAngle=6.2832
ValueRemainder=43200


[MeterHrHand3]
Meter=ROUNDLINE
MeasureName=MeasureTime
X=0
Y=20
W=220
H=220
LineStart= 49
LineLength=51
lineColor=0,0,0
LineWidth=7
AntiAlias=1
StartAngle=4.7124
RotationAngle=6.2832
ValueRemainder=43200


[MeasureHrHand3]
Measure=Time
Format=%#H
IfCondition= (HourUtil >= 6) && (HourUtil <= 18)
IfTrueAction=!ShowMeter MeterHrHand3
IfFalseAction=!HideMeter MeterHrHand3

*****************************************************************************************
[MeterMinHandN]
Meter=ROUNDLINE
MeasureName=MeasureTime
X=0
Y=20
W=220
H=220
LineStart=0
LineLength=60
LineColor=240,240,240
LineWidth=9
AntiAlias=1
StartAngle=4.7124
RotationAngle=6.2832
ValueRemainder=3600

[MeterMinHand]
Meter=ROUNDLINE
MeasureName=MeasureTime
X=0
Y=20
W=220
H=220
LineStart=0
LineLength=60
LineColor=0,0,0
LineWidth=9
AntiAlias=1
StartAngle=4.7124
RotationAngle=6.2832
ValueRemainder=3600

[MeasureMinHand]
Measure=Time
Format=%#H
IfCondition= (HourUtil >= 6) && (HourUtil <= 18)
IfTrueAction=!ShowMeter MeterMinHand
IfFalseAction=!HideMeter MeterMinHand

*********************************************************************************************

[MeterMinHand2N]
Meter=ROUNDLINE
MeasureName=MeasureTime
X=0
Y=20
W=220
H=220
LineStart=62
LineLength=65
LineColor=240,240,240
LineWidth=7
AntiAlias=1
StartAngle=4.7124
RotationAngle=6.2832
ValueRemainder=3600

[MeterMinHand2]
Meter=ROUNDLINE
MeasureName=MeasureTime
X=0
Y=20
W=220
H=220
LineStart=62
LineLength=65
LineColor=0,0,0
LineWidth=7
AntiAlias=1
StartAngle=4.7124
RotationAngle=6.2832
ValueRemainder=3600

[MeasureMinHand2]
Measure=Time
Format=%#H
IfCondition= (HourUtil >= 6) && (HourUtil <= 18)
IfTrueAction=!ShowMeter MeterMinHand2
IfFalseAction=!HideMeter MeterMinHand2
*********************************************************************************************

[MeterMinHand3N]
Meter=ROUNDLINE
MeasureName=MeasureTime
X=0
Y=20
W=220
H=220
LineStart=67
LineLength=69
LineColor=240,240,240
LineWidth=5
AntiAlias=1
StartAngle=4.7124
RotationAngle=6.2832
ValueRemainder=3600

[MeterMinHand3]
Meter=ROUNDLINE
MeasureName=MeasureTime
X=0
Y=20
W=220
H=220
LineStart=67
LineLength=69
LineColor=0,0,0
LineWidth=5
AntiAlias=1
StartAngle=4.7124
RotationAngle=6.2832
ValueRemainder=3600

[MeasureMinHand3]
Measure=Time
Format=%#H
IfCondition= (HourUtil >= 6) && (HourUtil <= 18)
IfTrueAction=!ShowMeter MeterMinHand3
IfFalseAction=!HideMeter MeterMinHand3

*********************************************************************************************

[MeterSecondsHand]
Meter=ROUNDLINE
MeasureName=MeasureTime
X=0
Y=20
W=220
H=220
LineLength=95
LineColor=255,0,0,150
LineWidth=2
AntiAlias=1
StartAngle=4.7124
RotationAngle=6.2832
ValueRemainder=60
*********************************************************************************************

[CenterN]
Meter=Image
ImageName=#@#Images\gen_dotN.png
X=0
Y=20
W=220
H=220

[Center]
Meter=Image
ImageName=#@#Images\gen_dot.png
X=0
Y=20
W=220
H=220

[MeasureCenter]
Measure=Time
Format=%#H
IfCondition= (HourUtil >= 6) && (HourUtil <= 18)
IfTrueAction=!ShowMeter Center
IfFalseAction=!HideMeter Center
*********************************************************************************
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5384
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Clock face based on the sunset and sunrise

Post by eclectic-tech »

To add to your code, I change the measure [MeasureName1] to only return the value of 'true' or 'false' for the "IsNight" section.
I added a new variable 'Location1' and set it to the geo ID number found on time.yandex.com for Detroit Michagan (89).
Then I use that number in [MeasureName1] to return the current "IsNight" value.
Finally, I test that value in measure [MeasureIsNight1] to determine which face to show.
Note: I hide both face image meters initially.

Code: Select all

[Variables]
; geo ID number from time.yandex for Detrot Michigan
Location1=89
gTZ=-4
gTZName=Michigan
Then add 2 new measures to get the current night condition from time.yandex.com for Detroit and see test if it matches 'true'. Here is a portion of your code with the 2 new measures and changes I made to your image meters.

Code: Select all

; Location1 ... returns 'true' if it is night at this location
[MeasureName1]
Measure=WebParser
UpdateRate=600
Url="http://time.yandex.com/sync.json?lang=en&geo=#Location1#"
RegExp="(?siU).*"isNight":(.*),"
StringIndex=1
FinishAction=[!EnableMeasure MeasureIsNight1][!UpdateMeasure MeasureIsNight1]

[MeasureIsNight1]
Measure=String
String=[MeasureName1]
IfMatch=(?i)true
IfMatchAction=[!ShowMeter MeterClockFaceN][!HideMeter MeterClockFaceD][!UpdateMeter *][!Redraw]
IfNotMatchAction=[!HideMeter MeterClockFaceN][!ShowMeter MeterClockFaceD][!UpdateMeter *][!Redraw]
DynamicVariables=1
Disabled=1

===================================================================
; METERS
*********************************************************************************************

[MeterClockFaceN]
Meter=Image
ImageName=#@#Images\N.png
PreserveAspectRatio=1
X=0
Y=0
W=220
H=250
Hidden=1

[MeterClockFaceD]
Meter=Image
ImageName=#@#Images\D.png
PreserveAspectRatio=1
X=0
Y=0
W=220
H=250
Hidden=1

; [MeasureClockFace]
; Measure=Time
; Format=%#H
; IfCondition= (HourUtil >= 6) && (HourUtil <= 18)
; IfTrueAction=!ShowMeter MeterClockFaceD
; IfFalseAction=!HideMeter MeterClockFaceD

If it does match, show the night face meter and hide the day face meter. If it does not match, show the day face meter and hide the night face meter.

You have 2 [MeasureTime] sections, delete one of them as Rainmeter will ignore duplicate sections.
Delete your test measure [MeasureClockFace].

I do not have your images, but these changes will automatically change the face based on the "IsNight" value returned by [MeasureName1].
the1ulike
Posts: 34
Joined: June 13th, 2020, 7:55 pm

Re: Clock face based on the sunset and sunrise

Post by the1ulike »

It's working fine now. The clock face is changed when I change the city code. I will wait to see what will happen at sunrise or sunset
But I have a question; how about the other meters such as [MeterDigitalDayOfWeekN], should I repeat [MeasureIsNight1] each time or this measure can be used for many actions. Please show me the code for the second meter
the1ulike
Posts: 34
Joined: June 13th, 2020, 7:55 pm

Re: Clock face based on the sunset and sunrise

Post by the1ulike »

Image
These are images
for the other meters, just to reverse the color from black to white
you may find a better way helping me for these meters
thanks indeed
You do not have the required permissions to view the files attached to this post.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5384
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Clock face based on the sunset and sunrise

Post by eclectic-tech »

One way to control all of your "Day" and "Night" meters is to add those meters to groups and use the single IfMatch test measure action to hide/show all of them with 1 action.

Here is your code with the meters in groups.
You will see I added "Group=Day" to all day meters, and "Group=Night" to all night meters.
Your [MeterSecondsHand] is in both groups.

I added "Hidden=1" to all meters to begin with.
Now [MeasureFace1] will test the value and show/hide the groups of meters.
I commented out all of your individual test measures since [MeasureFace1] controls the new groups.

I included the geo ID for several locations in the [Variables] section, so you can test the skin actions by changing the value of "Location1=#".

Code: Select all

[Variables]
; geo ID number from time.yandex for Detroit Michigan
Location1=89
; Melbourne AU geo ID = 21265
; Detroit Mi geo ID = 89
; Moscow RU geo ID = 213
; Los Angeles CA geo ID = 200
; Singapore geo ID = 10619
gTZ=-4
gTZName=Michigan

[MeasureTime]
Timezone=#gTZ#
Measure=Time

[Month]
Measure=Time
Timezone=#gTZ#
;Format=%b %d
Format=%d %b

[Year]
Measure=Time
Format=%Y

[Clock]
Timezone=#gTZ#
Measure=Time
Format=%p

[MeasureSeconds]
Measure=Time
Format=%S

[MeasureDayName]
Measure=Time
Timezone=#gTZ#
Format=%A

; [MeasureTime]
; Timezone=#gTZ#
; Measure=Time

[HourUtil]
Timezone=#gTZ#
Measure=Time
Format=%#H

; Location1 ... returns 'true' if it is night at this location
[MeasureName1]
Measure=WebParser
UpdateRate=600
Url="http://time.yandex.com/sync.json?lang=en&geo=#Location1#"
RegExp="(?siU).*"isNight":(.*),"
StringIndex=1
FinishAction=[!EnableMeasure MeasureFace1][!UpdateMeasure MeasureFace1]

[MeasureFace1]
Measure=String
String=[MeasureName1]
IfMatch=(?i)true
IfMatchAction=[!ShowMeterGroup Night][!HideMeterGroup Day][!UpdateMeter *][!Redraw]
IfNotMatchAction=[!HideMeterGroup Night][!ShowMeterGroup Day][!UpdateMeter *][!Redraw]
IfConditionMode=1
DynamicVariables=1
Disabled=1

;===================================================================
; METERS
;*********************************************************************************************

[MeterClockFaceN]
Group=Night
Hidden=1
Meter=Image
ImageName=#@#Images\N.png
PreserveAspectRatio=1
X=0
Y=0
W=220
H=250

[MeterClockFaceD]
Group=Day
Hidden=1
Meter=Image
ImageName=#@#Images\D.png
PreserveAspectRatio=1
X=0
Y=0
W=220
H=250

; [MeasureClockFace]
; Measure=Time
; Format=%#H
; IfCondition= (HourUtil >= 6) && (HourUtil <= 18)
; IfTrueAction=!ShowMeter MeterClockFaceD
; IfFalseAction=!HideMeter MeterClockFaceD

;**********************************************************************************

[MeterDigitalTimeN]
Group=Night
Hidden=1
Meter=String
StringStyle=Bold
;StringEffect=Shadow
FontColor=250,250,250
AntiAlias=1
MeasureName=Clock
StringAlign=CenterCenter
X=110
Y=218
FontSize=12
Text=%1 

[MeterDigitalTime]
Group=Day
Hidden=1
Meter=String
StringStyle=Bold
;StringEffect=Shadow
FontColor=10,10,10
AntiAlias=1
MeasureName=Clock
StringAlign=CenterCenter
X=110
Y=218
FontSize=12
Text=%1 


; [MeasureDigitalTime]
; Measure=Time
; Format=%#H
; IfCondition= (HourUtil >= 6) && (HourUtil <= 18)
; IfTrueAction=!ShowMeter MeterDigitalTime
; IfFalseAction=!HideMeter MeterDigitalTime

;*********************************************************************************************

[MeterDigitalDayOfWeekN]
Group=Night
Hidden=1
Meter=String
StringStyle=Bold
StringCase=Upper
FontFace=Century
AntiAlias=1
MeasureName=MeasureDayName
StringAlign=CenterCenter
X=111
Y=150
FontSize=10
FontColor=255,255,255
Text=%1

[MeterDigitalDayOfWeek]
Group=Day
Hidden=1
Meter=String
StringStyle=Bold
StringCase=Upper
FontFace=Century
AntiAlias=1
MeasureName=MeasureDayName
StringAlign=CenterCenter
X=111
Y=150
FontSize=10
FontColor=0,0,0
Text=%1

; [MeasureDigitalDayOfWeek]
; Measure=Time
; Format=%#H
; IfCondition= (HourUtil >= 6) && (HourUtil <= 18)
; IfTrueAction=!ShowMeter MeterDigitalDayOfWeek
; IfFalseAction=!HideMeter MeterDigitalDayOfWeek

;*********************************************************************************************

[MeterDigitalDateN]
Group=Night
Hidden=1
Meter=String
StringStyle=Bold
StringCase=Upper
FontColor=255,255,255
FontFace=Century
AntiAlias=1
MeasureName=Month
MeasureName2=Year
StringAlign=CenterCenter
X=111
Y=165
FontSize=10
Text=%1 %2

[MeterDigitalDate]
Group=Day
Hidden=1
Meter=String
StringStyle=Bold
StringCase=Upper
FontColor=0,0,0
FontFace=Century
AntiAlias=1
MeasureName=Month
MeasureName2=Year
StringAlign=CenterCenter
X=111
Y=165
FontSize=10
Text=%1 %2

; [MeasureDigitalDate]
; Measure=Time
; Format=%#H
; IfCondition= (HourUtil >= 6) && (HourUtil <= 18)
; IfTrueAction=!ShowMeter MeterDigitalDate
; IfFalseAction=!HideMeter MeterDigitalDate

;*********************************************************************************************

[MeterTZDisplayN]
Group=Night
Hidden=1
Meter=String
StringStyle=Bold
StringCase=Upper
FontColor=255,255,255
;FontFace=#dFont#
AntiAlias=1
;MeasureName=MeasureTime
StringAlign=CenterCenter
X=111
Y=95
FontSize=11
Text=#gTZname#

[MeterTZDisplay]
Group=Day
Hidden=1
Meter=String
StringStyle=Bold
StringCase=Upper
FontColor=0,0,0
;FontFace=#dFont#
AntiAlias=1
;MeasureName=MeasureTime
StringAlign=CenterCenter
X=111
Y=95
FontSize=11
Text=#gTZname#

; [MeasureTZDisplay]
; Measure=Time
; Format=%#H
; IfCondition= (HourUtil >= 6) && (HourUtil <= 18)
; IfTrueAction=!ShowMeter MeterTZDisplay
; IfFalseAction=!HideMeter MeterTZDisplay

;************************************Clock Hands ********************************************

[MeterHrHandN]
Group=Night
Hidden=1
Meter=ROUNDLINE
MeasureName=MeasureTime
X=0
Y=20
W=220
H=220
LineLength=40
LineColor=240,240,240
LineWidth=11
AntiAlias=1
StartAngle=4.7124
RotationAngle=6.2832
ValueRemainder=43200


[MeterHrHand]
Group=Day
Hidden=1
Meter=ROUNDLINE
MeasureName=MeasureTime
X=0
Y=20
W=220
H=220
LineLength=40
LineColor=0,0,0
LineWidth=11
AntiAlias=1
StartAngle=4.7124
RotationAngle=6.2832
ValueRemainder=43200

; [MeasureHrHand]
; Measure=Time
; Format=%#H
; IfCondition= (HourUtil >= 6) && (HourUtil <= 18)
; IfTrueAction=!ShowMeter MeterHrHand
; IfFalseAction=!HideMeter MeterHrHand

;********************************************************************************************

[MeterHrHand2N]
Group=Night
Hidden=1
Meter=ROUNDLINE
MeasureName=MeasureTime
X=0
Y=20
W=220
H=220
LineStart=43
LineLength=46
LineColor=240,240,240
LineWidth=9
AntiAlias=1
StartAngle=4.7124
RotationAngle=6.2832
ValueRemainder=43200


[MeterHrHand2]
Group=Day
Hidden=1
Meter=ROUNDLINE
MeasureName=MeasureTime
X=0
Y=20
W=220
H=220
LineStart=43
LineLength=46
LineColor=0,0,0
LineWidth=9
AntiAlias=1
StartAngle=4.7124
RotationAngle=6.2832
ValueRemainder=43200


; [MeasureHrHand2]
; Measure=Time
; Format=%#H
; IfCondition= (HourUtil >= 6) && (HourUtil <= 18)
; IfTrueAction=!ShowMeter MeterHrHand2
; IfFalseAction=!HideMeter MeterHrHand2

;*********************************************************************************************

[MeterHrHand3N]
Group=Night
Hidden=1
Meter=ROUNDLINE
MeasureName=MeasureTime
X=0
Y=20
W=220
H=220
LineStart= 49
LineLength=51
lineColor=240,240,240
LineWidth=7
AntiAlias=1
StartAngle=4.7124
RotationAngle=6.2832
ValueRemainder=43200


[MeterHrHand3]
Group=Day
Hidden=1
Meter=ROUNDLINE
MeasureName=MeasureTime
X=0
Y=20
W=220
H=220
LineStart= 49
LineLength=51
lineColor=0,0,0
LineWidth=7
AntiAlias=1
StartAngle=4.7124
RotationAngle=6.2832
ValueRemainder=43200


; [MeasureHrHand3]
; Measure=Time
; Format=%#H
; IfCondition= (HourUtil >= 6) && (HourUtil <= 18)
; IfTrueAction=!ShowMeter MeterHrHand3
; IfFalseAction=!HideMeter MeterHrHand3

;*****************************************************************************************

[MeterMinHandN]
Group=Night
Hidden=1
Meter=ROUNDLINE
MeasureName=MeasureTime
X=0
Y=20
W=220
H=220
LineStart=0
LineLength=60
LineColor=240,240,240
LineWidth=9
AntiAlias=1
StartAngle=4.7124
RotationAngle=6.2832
ValueRemainder=3600

[MeterMinHand]
Group=Day
Hidden=1
Meter=ROUNDLINE
MeasureName=MeasureTime
X=0
Y=20
W=220
H=220
LineStart=0
LineLength=60
LineColor=0,0,0
LineWidth=9
AntiAlias=1
StartAngle=4.7124
RotationAngle=6.2832
ValueRemainder=3600

; [MeasureMinHand]
; Measure=Time
; Format=%#H
; IfCondition= (HourUtil >= 6) && (HourUtil <= 18)
; IfTrueAction=!ShowMeter MeterMinHand
; IfFalseAction=!HideMeter MeterMinHand

;*********************************************************************************************

[MeterMinHand2N]
Group=Night
Hidden=1
Meter=ROUNDLINE
MeasureName=MeasureTime
X=0
Y=20
W=220
H=220
LineStart=62
LineLength=65
LineColor=240,240,240
LineWidth=7
AntiAlias=1
StartAngle=4.7124
RotationAngle=6.2832
ValueRemainder=3600

[MeterMinHand2]
Group=Day
Hidden=1
Meter=ROUNDLINE
MeasureName=MeasureTime
X=0
Y=20
W=220
H=220
LineStart=62
LineLength=65
LineColor=0,0,0
LineWidth=7
AntiAlias=1
StartAngle=4.7124
RotationAngle=6.2832
ValueRemainder=3600

; [MeasureMinHand2]
; Measure=Time
; Format=%#H
; IfCondition= (HourUtil >= 6) && (HourUtil <= 18)
; IfTrueAction=!ShowMeter MeterMinHand2
; IfFalseAction=!HideMeter MeterMinHand2

;*********************************************************************************************

[MeterMinHand3N]
Group=Night
Hidden=1
Meter=ROUNDLINE
MeasureName=MeasureTime
X=0
Y=20
W=220
H=220
LineStart=67
LineLength=69
LineColor=240,240,240
LineWidth=5
AntiAlias=1
StartAngle=4.7124
RotationAngle=6.2832
ValueRemainder=3600

[MeterMinHand3]
Group=Day
Hidden=1
Meter=ROUNDLINE
MeasureName=MeasureTime
X=0
Y=20
W=220
H=220
LineStart=67
LineLength=69
LineColor=0,0,0
LineWidth=5
AntiAlias=1
StartAngle=4.7124
RotationAngle=6.2832
ValueRemainder=3600

; [MeasureMinHand3]
; Measure=Time
; Format=%#H
; IfCondition= (HourUtil >= 6) && (HourUtil <= 18)
; IfTrueAction=!ShowMeter MeterMinHand3
; IfFalseAction=!HideMeter MeterMinHand3

;*********************************************************************************************

[MeterSecondsHand]
Group=Day | Night
Hidden=1
Meter=ROUNDLINE
MeasureName=MeasureTime
X=0
Y=20
W=220
H=220
LineLength=95
LineColor=255,0,0,150
LineWidth=2
AntiAlias=1
StartAngle=4.7124
RotationAngle=6.2832
ValueRemainder=60

;*********************************************************************************************

[CenterN]
Group=Night
Hidden=1
Meter=Image
ImageName=#@#Images\gen_dotN.png
X=0
Y=20
W=220
H=220

[Center]
Group=Day
Hidden=1
Meter=Image
ImageName=#@#Images\gen_dot.png
X=0
Y=20
W=220
H=220

; [MeasureCenter]
; Measure=Time
; Format=%#H
; IfCondition= (HourUtil >= 6) && (HourUtil <= 18)
; IfTrueAction=!ShowMeter Center
; IfFalseAction=!HideMeter Center

;*********************************************************************************
You have multiple time measures to collect different information about the timezone you defined in [Variables]. If you study my originally posted code, you will see it is possible to get the location name, time, and night condition in separate String Indexes which could replace many of these time measures with just a few.

But that is for another time (pun intended :oops: ).
the1ulike
Posts: 34
Joined: June 13th, 2020, 7:55 pm

Re: Clock face based on the sunset and sunrise

Post by the1ulike »

Everything working fine. Thank you
Now, one more add please; how to use a timezone from this URL instead of Timezone=#gTZ#
this will help to get me the correct time zone and will be changed automatically when some countries use summertime and wintertime.
And, you are correct about many time measures. But in the first place, I was trying doing this without using URL

Code: Select all

[Variables]

; geo ID number from https://yandex.com/time/ for Location1
;Location1=(ex.89)
;gTZName=(Ex. Detroit)
;gTZ=(Ex. -4)
;@include=#@#Main\main.inc


[MeasureTime]
Timezone=#gTZ#
Measure=Time

[Month]
Measure=Time
Timezone=#gTZ#

Format=%d %b

[Year]
Measure=Time
Format=%Y

[Clock]
Timezone=#gTZ#
Measure=Time
Format=%p

[MeasureSeconds]
Measure=Time
Format=%S

[MeasureDayName]
Measure=Time
Timezone=#gTZ#
Format=%A

[HourUtil]
Timezone=#gTZ#
Measure=Time
Format=%#H

; Location1 ... returns 'true' if it is night at this location
[MeasureName1]
Measure=WebParser
UpdateRate=600
Url="http://time.yandex.com/sync.json?lang=en&geo=#Location1#"
RegExp="(?siU).*"isNight":(.*),"
StringIndex=1
FinishAction=[!EnableMeasure MeasureFace1][!UpdateMeasure MeasureFace1]

[MeasureFace1]
Measure=String
String=[MeasureName1]
IfMatch=(?i)true
IfMatchAction=[!ShowMeterGroup Night][!HideMeterGroup Day][!UpdateMeter *][!Redraw]
IfNotMatchAction=[!HideMeterGroup Night][!ShowMeterGroup Day][!UpdateMeter *][!Redraw]
IfConditionMode=1
DynamicVariables=1
Disabled=1

;===================================================================
; METERS
;*********************************************************************************************

[MeterClockFaceN]
Group=Night
Hidden=1
Meter=Image
ImageName=#@#Images\N.png
PreserveAspectRatio=1
X=0
Y=0
W=220
H=250

[MeterClockFaceD]
Group=Day
Hidden=1
Meter=Image
ImageName=#@#Images\D.png
PreserveAspectRatio=1
X=0
Y=0
W=220
H=250

;**********************************************************************************

[MeterDigitalTimeN]
Group=Night
Hidden=1
Meter=String
StringStyle=Bold
;StringEffect=Shadow
FontColor=250,250,250
AntiAlias=1
MeasureName=Clock
StringAlign=CenterCenter
X=110
Y=218
FontSize=12
Text=%1 

[MeterDigitalTime]
Group=Day
Hidden=1
Meter=String
StringStyle=Bold
;StringEffect=Shadow
FontColor=10,10,10
AntiAlias=1
MeasureName=Clock
StringAlign=CenterCenter
X=110
Y=218
FontSize=12
Text=%1 

;*********************************************************************************************

[MeterDigitalDayOfWeekN]
Group=Night
Hidden=1
Meter=String
StringStyle=Bold
StringCase=Upper
FontFace=Century
AntiAlias=1
MeasureName=MeasureDayName
StringAlign=CenterCenter
X=111
Y=150
FontSize=10
FontColor=255,255,255
Text=%1

[MeterDigitalDayOfWeek]
Group=Day
Hidden=1
Meter=String
StringStyle=Bold
StringCase=Upper
FontFace=Century
AntiAlias=1
MeasureName=MeasureDayName
StringAlign=CenterCenter
X=111
Y=150
FontSize=10
FontColor=0,0,0
Text=%1

;*********************************************************************************************

[MeterDigitalDateN]
Group=Night
Hidden=1
Meter=String
StringStyle=Bold
StringCase=Upper
FontColor=255,255,255
FontFace=Century
AntiAlias=1
MeasureName=Month
MeasureName2=Year
StringAlign=CenterCenter
X=111
Y=165
FontSize=10
Text=%1 %2

[MeterDigitalDate]
Group=Day
Hidden=1
Meter=String
StringStyle=Bold
StringCase=Upper
FontColor=0,0,0
FontFace=Century
AntiAlias=1
MeasureName=Month
MeasureName2=Year
StringAlign=CenterCenter
X=111
Y=165
FontSize=10
Text=%1 %2

;*********************************************************************************************

[MeterTZDisplayN]
Group=Night
Hidden=1
Meter=String
StringStyle=Bold
StringCase=Upper
FontColor=255,255,255
;FontFace=#dFont#
AntiAlias=1
;MeasureName=MeasureTime
StringAlign=CenterCenter
X=111
Y=95
FontSize=11
Text=#gTZname#

[MeterTZDisplay]
Group=Day
Hidden=1
Meter=String
StringStyle=Bold
StringCase=Upper
FontColor=0,0,0
;FontFace=#dFont#
AntiAlias=1
;MeasureName=MeasureTime
StringAlign=CenterCenter
X=111
Y=95
FontSize=11
Text=#gTZname#


;************************************Clock Hands ********************************************

[MeterHrHandN]
Group=Night
Hidden=1
Meter=ROUNDLINE
MeasureName=MeasureTime
X=0
Y=20
W=220
H=220
LineLength=40
LineColor=240,240,240
LineWidth=11
AntiAlias=1
StartAngle=4.7124
RotationAngle=6.2832
ValueRemainder=43200


[MeterHrHand]
Group=Day
Hidden=1
Meter=ROUNDLINE
MeasureName=MeasureTime
X=0
Y=20
W=220
H=220
LineLength=40
LineColor=0,0,0
LineWidth=11
AntiAlias=1
StartAngle=4.7124
RotationAngle=6.2832
ValueRemainder=43200

;********************************************************************************************

[MeterHrHand2N]
Group=Night
Hidden=1
Meter=ROUNDLINE
MeasureName=MeasureTime
X=0
Y=20
W=220
H=220
LineStart=43
LineLength=46
LineColor=240,240,240
LineWidth=9
AntiAlias=1
StartAngle=4.7124
RotationAngle=6.2832
ValueRemainder=43200


[MeterHrHand2]
Group=Day
Hidden=1
Meter=ROUNDLINE
MeasureName=MeasureTime
X=0
Y=20
W=220
H=220
LineStart=43
LineLength=46
LineColor=0,0,0
LineWidth=9
AntiAlias=1
StartAngle=4.7124
RotationAngle=6.2832
ValueRemainder=43200

;*********************************************************************************************

[MeterHrHand3N]
Group=Night
Hidden=1
Meter=ROUNDLINE
MeasureName=MeasureTime
X=0
Y=20
W=220
H=220
LineStart= 49
LineLength=51
lineColor=240,240,240
LineWidth=7
AntiAlias=1
StartAngle=4.7124
RotationAngle=6.2832
ValueRemainder=43200


[MeterHrHand3]
Group=Day
Hidden=1
Meter=ROUNDLINE
MeasureName=MeasureTime
X=0
Y=20
W=220
H=220
LineStart= 49
LineLength=51
lineColor=0,0,0
LineWidth=7
AntiAlias=1
StartAngle=4.7124
RotationAngle=6.2832
ValueRemainder=43200

;*****************************************************************************************

[MeterMinHandN]
Group=Night
Hidden=1
Meter=ROUNDLINE
MeasureName=MeasureTime
X=0
Y=20
W=220
H=220
LineStart=0
LineLength=60
LineColor=240,240,240
LineWidth=9
AntiAlias=1
StartAngle=4.7124
RotationAngle=6.2832
ValueRemainder=3600

[MeterMinHand]
Group=Day
Hidden=1
Meter=ROUNDLINE
MeasureName=MeasureTime
X=0
Y=20
W=220
H=220
LineStart=0
LineLength=60
LineColor=0,0,0
LineWidth=9
AntiAlias=1
StartAngle=4.7124
RotationAngle=6.2832
ValueRemainder=3600

;*********************************************************************************************

[MeterMinHand2N]
Group=Night
Hidden=1
Meter=ROUNDLINE
MeasureName=MeasureTime
X=0
Y=20
W=220
H=220
LineStart=62
LineLength=65
LineColor=240,240,240
LineWidth=7
AntiAlias=1
StartAngle=4.7124
RotationAngle=6.2832
ValueRemainder=3600

[MeterMinHand2]
Group=Day
Hidden=1
Meter=ROUNDLINE
MeasureName=MeasureTime
X=0
Y=20
W=220
H=220
LineStart=62
LineLength=65
LineColor=0,0,0
LineWidth=7
AntiAlias=1
StartAngle=4.7124
RotationAngle=6.2832
ValueRemainder=3600

;*********************************************************************************************

[MeterMinHand3N]
Group=Night
Hidden=1
Meter=ROUNDLINE
MeasureName=MeasureTime
X=0
Y=20
W=220
H=220
LineStart=67
LineLength=69
LineColor=240,240,240
LineWidth=5
AntiAlias=1
StartAngle=4.7124
RotationAngle=6.2832
ValueRemainder=3600

[MeterMinHand3]
Group=Day
Hidden=1
Meter=ROUNDLINE
MeasureName=MeasureTime
X=0
Y=20
W=220
H=220
LineStart=67
LineLength=69
LineColor=0,0,0
LineWidth=5
AntiAlias=1
StartAngle=4.7124
RotationAngle=6.2832
ValueRemainder=3600

;*********************************************************************************************

[MeterSecondsHand]
;Group=Day | Night
;Hidden=1
Meter=ROUNDLINE
MeasureName=MeasureTime
X=0
Y=20
W=220
H=220
LineLength=95
LineColor=255,0,0,150
LineWidth=2
AntiAlias=1
StartAngle=4.7124
RotationAngle=6.2832
ValueRemainder=60

;*********************************************************************************************

[CenterN]
Group=Night
Hidden=1
Meter=Image
ImageName=#@#Images\gen_dotN.png
X=0
Y=20
W=220
H=220

[Center]
Group=Day
Hidden=1
Meter=Image
ImageName=#@#Images\gen_dot.png
X=0
Y=20
W=220
H=220
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5384
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Clock face based on the sunset and sunrise

Post by eclectic-tech »

the1ulike wrote: June 15th, 2020, 5:15 pm Everything working fine. Thank you
Now, one more add please; how to use a timezone from this URL instead of Timezone=#gTZ#
this will help to get me the correct time zone and will be changed automatically when some countries use summertime and wintertime.
And, you are correct about many time measures. But in the first place, I was trying doing this without using URL
Alright, you should study this process to understand what is happening.

1.) The webparser returns 4 values for the defined geo value: Name, Offset, TimeZone, IsNight (true/false)
2.) The offset value is used in a time measure [MeasureTime] to determine the time or the location
3.) That time measure is used to extract the year, month, day, and seconds for use in the skin
4.) The IsNight value is tested to determine which meters to display
5.) the [MeterSecondsHand] is used in both displays, so it is not in a meter group, it is hidden but is changed when either meter group is shown

Here is working code using these changes:
DayNightClocks.ini

Code: Select all

[Variables]
; geo ID number from time.yandex for Detroit Michigan
Location=213
; Melbourne AU geo ID = 21265
; Detroit Mi geo ID = 89
; Moscow RU geo ID = 213
; Los Angeles CA geo ID = 200
; Singapore geo ID = 10619

; Location
[MeasureName]
Measure=Plugin
Plugin=Plugins\WebParser.dll
UpdateRate=600
Url="http://time.yandex.com/sync.json?lang=en&geo=#Location#"
;Debug=1
RegExp="(?siU).*"name":"(.*)".*"offset":(.*),"offsetString":"(.*)".*,"isNight":(.*),"
StringIndex=1
DecodeCharacterReference=1
DynamicVariables=1
 
; This returns an offset number for the defined city that tells you the current time UTC+14400000 
[MeasureOffset]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureName]
StringIndex=2
Substitute="":"0"

[MeasureTimeZone]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureName]
StringIndex=3
Substitute="UTC":""

[MeasureIsNight]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureName]
StringIndex=4
Substitute="true":"Night","false":"Day"
IfMatch=(?i)Night
IfMatchAction=[!ShowMeterGroup Night][!HideMeterGroup Day][!ShowMeter MeterSecondsHand][!UpdateMeter *][!Redraw]
IfNotMatchAction=[!HideMeterGroup Night][!ShowMeterGroup Day][!ShowMeter MeterSecondsHand][!UpdateMeter *][!Redraw]
IfConditionMode=1
DynamicVariables=1

; Converts the offset value returned by the webparser to a timezone to determine the time at the defined location
; This is used as the source for the other time related values; year, month, day, etc.
[MeasureTime]
Measure=Time
Timezone=([MeasureOffset]/3600000)
DynamicVariables=1

[MeasureYear]
Measure=Time
TimeStamp=[MeasureTime:]
Format=%Y
DynamicVariables=1

[MeasureSeconds]
Measure=Time
TimeStamp=[MeasureTime:]
Format=%S
DynamicVariables=1

[MeasureMonth]
Measure=Time
TimeStamp=[MeasureTime:]
Format=%d %b
DynamicVariables=1

[MeasureDay]
Measure=Time
Format=%A 
TimeStamp=[MeasureTime:]
DynamicVariables=1

;===================================================================
; METERS
;*********************************************************************************************

[MeterClockFaceN]
Group=Night
Hidden=1
Meter=Image
ImageName=#@#Images\N.png
PreserveAspectRatio=1
X=0
Y=0
W=220
H=250

[MeterClockFaceD]
Group=Day
Hidden=1
Meter=Image
ImageName=#@#Images\D.png
PreserveAspectRatio=1
X=0
Y=0
W=220
H=250

;**********************************************************************************

[MeterDigitalTimeN]
Group=Night
Hidden=1
Meter=String
StringStyle=Bold
;StringEffect=Shadow
FontColor=250,250,250
AntiAlias=1
MeasureName=MeasureTime
StringAlign=CenterCenter
X=110
Y=218
FontSize=12
Text=%1 

[MeterDigitalTime]
Group=Day
Hidden=1
Meter=String
StringStyle=Bold
;StringEffect=Shadow
FontColor=10,10,10
AntiAlias=1
MeasureName=MeasureTime
StringAlign=CenterCenter
X=110
Y=218
FontSize=12
Text=%1 


;*********************************************************************************************

[MeterDigitalDayOfWeekN]
Group=Night
Hidden=1
Meter=String
StringStyle=Bold
StringCase=Upper
FontFace=Century
AntiAlias=1
MeasureName=MeasureDay
StringAlign=CenterCenter
X=111
Y=150
FontSize=10
FontColor=255,255,255
Text=%1

[MeterDigitalDayOfWeek]
Group=Day
Hidden=1
Meter=String
StringStyle=Bold
StringCase=Upper
FontFace=Century
AntiAlias=1
MeasureName=MeasureDay
StringAlign=CenterCenter
X=111
Y=150
FontSize=10
FontColor=0,0,0
Text=%1

;*********************************************************************************************

[MeterDigitalDateN]
Group=Night
Hidden=1
Meter=String
StringStyle=Bold
StringCase=Upper
FontColor=255,255,255
FontFace=Century
AntiAlias=1
MeasureName=MeasureMonth
MeasureName2=MeasureYear
StringAlign=CenterCenter
X=111
Y=165
FontSize=10
Text=%1 %2

[MeterDigitalDate]
Group=Day
Hidden=1
Meter=String
StringStyle=Bold
StringCase=Upper
FontColor=0,0,0
FontFace=Century
AntiAlias=1
MeasureName=MeasureMonth
MeasureName2=MeasureYear
StringAlign=CenterCenter
X=111
Y=165
FontSize=10
Text=%1 %2

;*********************************************************************************************

[MeterTZDisplayN]
Group=Night
Hidden=1
Meter=String
StringStyle=Bold
StringCase=Upper
FontColor=255,255,255
;FontFace=#dFont#
AntiAlias=1
MeasureName=MeasureName
StringAlign=CenterCenter
X=111
Y=95
FontSize=11
;Text=#gTZname#

[MeterTZDisplay]
Group=Day
Hidden=1
Meter=String
StringStyle=Bold
StringCase=Upper
FontColor=0,0,0
;FontFace=#dFont#
AntiAlias=1
MeasureName=MeasureName
StringAlign=CenterCenter
X=111
Y=95
FontSize=11
;Text=#gTZname#

;************************************Clock Hands ********************************************

[MeterHrHandN]
Group=Night
Hidden=1
Meter=ROUNDLINE
MeasureName=MeasureTime
X=0
Y=20
W=220
H=220
LineLength=40
LineColor=240,240,240
LineWidth=11
AntiAlias=1
StartAngle=4.7124
RotationAngle=6.2832
ValueRemainder=43200


[MeterHrHand]
Group=Day
Hidden=1
Meter=ROUNDLINE
MeasureName=MeasureTime
X=0
Y=20
W=220
H=220
LineLength=40
LineColor=0,0,0
LineWidth=11
AntiAlias=1
StartAngle=4.7124
RotationAngle=6.2832
ValueRemainder=43200

;********************************************************************************************

[MeterHrHand2N]
Group=Night
Hidden=1
Meter=ROUNDLINE
MeasureName=MeasureTime
X=0
Y=20
W=220
H=220
LineStart=43
LineLength=46
LineColor=240,240,240
LineWidth=9
AntiAlias=1
StartAngle=4.7124
RotationAngle=6.2832
ValueRemainder=43200


[MeterHrHand2]
Group=Day
Hidden=1
Meter=ROUNDLINE
MeasureName=MeasureTime
X=0
Y=20
W=220
H=220
LineStart=43
LineLength=46
LineColor=0,0,0
LineWidth=9
AntiAlias=1
StartAngle=4.7124
RotationAngle=6.2832
ValueRemainder=43200


;*********************************************************************************************

[MeterHrHand3N]
Group=Night
Hidden=1
Meter=ROUNDLINE
MeasureName=MeasureTime
X=0
Y=20
W=220
H=220
LineStart= 49
LineLength=51
lineColor=240,240,240
LineWidth=7
AntiAlias=1
StartAngle=4.7124
RotationAngle=6.2832
ValueRemainder=43200


[MeterHrHand3]
Group=Day
Hidden=1
Meter=ROUNDLINE
MeasureName=MeasureTime
X=0
Y=20
W=220
H=220
LineStart= 49
LineLength=51
lineColor=0,0,0
LineWidth=7
AntiAlias=1
StartAngle=4.7124
RotationAngle=6.2832
ValueRemainder=43200


;*****************************************************************************************

[MeterMinHandN]
Group=Night
Hidden=1
Meter=ROUNDLINE
MeasureName=MeasureTime
X=0
Y=20
W=220
H=220
LineStart=0
LineLength=60
LineColor=240,240,240
LineWidth=9
AntiAlias=1
StartAngle=4.7124
RotationAngle=6.2832
ValueRemainder=3600

[MeterMinHand]
Group=Day
Hidden=1
Meter=ROUNDLINE
MeasureName=MeasureTime
X=0
Y=20
W=220
H=220
LineStart=0
LineLength=60
LineColor=0,0,0
LineWidth=9
AntiAlias=1
StartAngle=4.7124
RotationAngle=6.2832
ValueRemainder=3600

;*********************************************************************************************

[MeterMinHand2N]
Group=Night
Hidden=1
Meter=ROUNDLINE
MeasureName=MeasureTime
X=0
Y=20
W=220
H=220
LineStart=62
LineLength=65
LineColor=240,240,240
LineWidth=7
AntiAlias=1
StartAngle=4.7124
RotationAngle=6.2832
ValueRemainder=3600

[MeterMinHand2]
Group=Day
Hidden=1
Meter=ROUNDLINE
MeasureName=MeasureTime
X=0
Y=20
W=220
H=220
LineStart=62
LineLength=65
LineColor=0,0,0
LineWidth=7
AntiAlias=1
StartAngle=4.7124
RotationAngle=6.2832
ValueRemainder=3600

;*********************************************************************************************

[MeterMinHand3N]
Group=Night
Hidden=1
Meter=ROUNDLINE
MeasureName=MeasureTime
X=0
Y=20
W=220
H=220
LineStart=67
LineLength=69
LineColor=240,240,240
LineWidth=5
AntiAlias=1
StartAngle=4.7124
RotationAngle=6.2832
ValueRemainder=3600

[MeterMinHand3]
Group=Day
Hidden=1
Meter=ROUNDLINE
MeasureName=MeasureTime
X=0
Y=20
W=220
H=220
LineStart=67
LineLength=69
LineColor=0,0,0
LineWidth=5
AntiAlias=1
StartAngle=4.7124
RotationAngle=6.2832
ValueRemainder=3600

;*********************************************************************************************

[MeterSecondsHand]
Hidden=1
Meter=ROUNDLINE
MeasureName=MeasureTime
X=0
Y=20
W=220
H=220
LineLength=95
LineColor=255,0,0,150
LineWidth=2
AntiAlias=1
StartAngle=4.7124
RotationAngle=6.2832
ValueRemainder=60

;*********************************************************************************************

[CenterN]
Group=Night
Hidden=1
Meter=Image
ImageName=#@#Images\gen_dotN.png
X=0
Y=20
W=220
H=220

[Center]
Group=Day
Hidden=1
Meter=Image
ImageName=#@#Images\gen_dot.png
X=0
Y=20
W=220
H=220

;*********************************************************************************
The results look like this:
Day-NightClocks.png
You do not have the required permissions to view the files attached to this post.