It is currently April 16th, 2024, 8:44 am

Problems retrieving time zone with version 4.5 sept 12 release

Report bugs with the Rainmeter application and suggest features.
User avatar
pashaak
Posts: 7
Joined: October 25th, 2019, 3:11 am

Problems retrieving time zone with version 4.5 sept 12 release

Post by pashaak »

The following code no longer works under version 4.5 (Retrieves full name of time zone)

Code: Select all

[MeasureTimeZoneSorD]
Measure=Plugin
Plugin=SysInfo.dll
SysInfoType=TIMEZONE_ISDST
IfCondition=(MeasureTimeZoneSorD=0)
IfTrueAction=[!SetOption BigTimeZone Text "([MeasureTimeZoneStandard])"]
IfFalseAction=[!SetOption BigTimeZone Text "([MeasureTimeZoneDaylight])"]
IfCondition=(MeasureTimeZoneSorD=-0)
IfTrueAction=[!SetOption BigTimeZone Text "(Time Zone Unavailable)"]
Group=LCARS-Clock

[MeasureTimeZoneStandard]
Measure=Plugin
Plugin=SysInfo
SysInfoType=TIMEZONE_STANDARD_NAME
Group=LCARS-Clock

[MeasureTimeZoneDayLight]
Measure=Plugin
Plugin=SysInfo
SysInfoType=TIMEZONE_DAYLIGHT_NAME
Group=LCARS-Clock

[BigTimeZone]
Meter=String
X=0r
Y=21r
FontColor=#LightGreenS#
FontFace=#FontFace#
FontSize=17
AntiAlias=1
Hidden=1
Text=
Group=LCARS-Clock
What's Up?
Last edited by eclectic-tech on September 22nd, 2021, 4:11 pm, edited 1 time in total.
Reason: Removed 'Checked' since this is not resolved yet. Please use code tags, it is the </> symbol.
~ "Things are only impossible until they are done"
User avatar
balala
Rainmeter Sage
Posts: 16141
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Problems retrieving time zone with version 4.5 sept 12 release

Post by balala »

pashaak wrote: September 22nd, 2021, 3:56 pm The following code no longer works under version 4.5 (Retrieves full name of time zone)
What "no longer works" does mean? Because it does work for me. What do you expect it to do and it doesn't?
User avatar
pashaak
Posts: 7
Joined: October 25th, 2019, 3:11 am

Re: Problems retrieving time zone with version 4.5 sept 12 release

Post by pashaak »

It retrieves the full text name of the current time zone i.e. "Eastern Daylight Time". Now it just returns "0".

I Chased my tail for a little while, then realized that the Rainmeter upgrade was the only thing that was changed. Dowgraded to the previous beta version and everything works fine.

sorry for the lack of detail in my original post

Thank you.
~ "Things are only impossible until they are done"
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Problems retrieving time zone with version 4.5 sept 12 release

Post by jsmorley »

pashaak wrote: September 22nd, 2021, 7:56 pm It retrieves the full text name of the current time zone i.e. "Eastern Daylight Time". Now it just returns "0".

I Chased my tail for a little while, then realized that the Rainmeter upgrade was the only thing that was changed. Dowgraded to the previous beta version and everything works fine.

sorry for the lack of detail in my original post

Thank you.
Your code as posted works fine for me.

Make sure you have the latest version of Rainmeter, which as of this writing is 4.5.2 from https://www.rainmeter.net/
User avatar
balala
Rainmeter Sage
Posts: 16141
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Problems retrieving time zone with version 4.5 sept 12 release

Post by balala »

jsmorley wrote: September 22nd, 2021, 8:04 pm Your code as posted works fine for me.
For me too, as said in my previous reply, so not sure...
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Problems retrieving time zone with version 4.5 sept 12 release

Post by jsmorley »

The problem is with your example code...

Code: Select all

Measure=Plugin
Plugin=SysInfo.dll
SysInfoType=TIMEZONE_ISDST
IfCondition=(MeasureTimeZoneSorD=0)
IfTrueAction=[!SetOption BigTimeZone Text "([MeasureTimeZoneStandard])"]
IfFalseAction=[!SetOption BigTimeZone Text "([MeasureTimeZoneDaylight])"]
IfCondition=(MeasureTimeZoneSorD=-0)
IfTrueAction=[!SetOption BigTimeZone Text "(Time Zone Unavailable)"]
Group=LCARS-Clock
Try something like this:

Code: Select all

[MeasureTimeZoneStandard]
Measure=Plugin
Plugin=SysInfo
SysInfoType=TIMEZONE_STANDARD_NAME
Group=LCARS-Clock

[MeasureTimeZoneDayLight]
Measure=Plugin
Plugin=SysInfo
SysInfoType=TIMEZONE_DAYLIGHT_NAME
Group=LCARS-Clock

[MeasureTimeZoneSorD]
Measure=Plugin
Plugin=SysInfo.dll
SysInfoType=TIMEZONE_ISDST
IfCondition=(MeasureTimeZoneSorD=0)
IfTrueAction=[!SetOption BigTimeZone Text "([MeasureTimeZoneStandard])"]
IfFalseAction=[!SetOption BigTimeZone Text "([MeasureTimeZoneDaylight])"]
IfCondition2=(MeasureTimeZoneSorD=-0)
IfTrueAction2=[!SetOption BigTimeZone Text "(Time Zone Unavailable)"]

[BigTimeZone]
Meter=String
FontSize=17
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
You can only have one IfCondition per measure, if you need more than one, you need IfCondition2=, IfCondition3= etc.

Also, you need the test that sets the Text with the value of the measure(s) to come after the measures it's using, or they will just be empty. The way IfCondition works is that it only fires the action(s) once when the condition changes between "false" and "true" (or "true" and "false"). So when your code was executed, there were no values for those two measures yet, so they were not set to anything. (well the default "0") Since the "test" didn't change value on subsequent updates, the IfCondition(s) didn't fire, and the meter just stayed zero.



1.png
You do not have the required permissions to view the files attached to this post.
User avatar
pashaak
Posts: 7
Joined: October 25th, 2019, 3:11 am

Re: Problems retrieving time zone with version 4.5 sept 12 release

Post by pashaak »

Thank You very much. I can't Believe I Didn't Number the second if conditon....Sloppy Programming on my part. Thans again!
~ "Things are only impossible until they are done"