It is currently April 26th, 2024, 9:17 pm

Change am/pm to 24 hour

Get help with creating, editing & fixing problems with skins
Leeroy2608
Posts: 9
Joined: October 13th, 2020, 2:35 pm

Change am/pm to 24 hour

Post by Leeroy2608 »

I know this question was asked many times but I can't change my clock from ampm to 24h.

Here's the skin:

Code: Select all

[Rainmeter]
Update=1000
Author=Connect-R
BackgroundMode=2
SolidColor=0,0,0,1
DynamicWindowSize=1
AccurateText=1
MouseScrollUpAction=[!SetVariable Scale "(#Scale#+#ScrollMouseIncrement#)"][!WriteKeyValue Variables Scale "(#Scale#+#ScrollMouseIncrement#)"][!Refresh] 
MouseScrollDownAction=[!SetVariable Scale "(#Scale#-#ScrollMouseIncrement# < 0.2 ? 0.2 : #Scale#-#ScrollMouseIncrement#)"][!WriteKeyValue Variables Scale "(#Scale#-#ScrollMouseIncrement# < 0.2 ? 0.2 : #Scale#-#ScrollMouseIncrement#)"][!Refresh]
SkinHeight=(180*#Scale#)

[Variables]
@include=#@#Variables.inc
@include2=#@#Language\Language.inc
Scale=1.75

;-------------------------------------------------------------
;-------------------------------------------------------------

[MeasureTime]
Measure=Time
Format=%#Format#:%M

[MeasureAmPm]
Measure=Time
Format=%p

[MeasureDay]
Measure=Time
Format=%A
Substitute=#Date#

[MeasureDate]
Measure=Time
Format=%d
Substitute=#Date#

[MeasureMonth]
Measure=Time
Format=%B
Substitute=#Date#

;-------------------------------------------------------------
;-------------------------------------------------------------

[MeterTodayText]
Meter=String
MeasureName=MeasureDay
StringAlign=Center
FontFace=Metropolis Black
FontColor=#Color1#
FontSize=(70*#Scale#)
X=(240*#Scale#)
Y=(0*#Scale#)
Text=today
AntiAlias=1
UpdateDivider=-1

[MeterIsText]
Meter=String
MeasureName=MeasureDay
StringAlign=Center
FontFace=Tuesday Night
FontColor=#Color2#
FontSize=(110*#Scale#)
X=(240*#Scale#)
Y=(-95*#Scale#)
Text=is
AntiAlias=1
UpdateDivider=-1

;-------------------------------------------------------------
;-------------------------------------------------------------

[MeterDate]
Meter=String
MeasureName=MeasureDay
MeasureName2=MeasureDate
MeasureName3=MeasureMonth
StringAlign=Center
StringCase=Upper
FontFace=Metropolis Black
FontColor=#Color1#
FontSize=(10*#Scale#)
X=(240*#Scale#)
Y=(100*#Scale#)
Text=%1 %2 %3
AntiAlias=1
InlineSetting=CharacterSpacing | (4*#Scale#) | (4*#Scale#)
Hidden=#Hidden#

[MeterDate2]
Meter=String
MeasureName=MeasureDay
MeasureName2=MeasureMonth
MeasureName3=MeasureDate
StringAlign=Center
StringCase=Upper
FontFace=Metropolis Black
FontColor=#Color1#
FontSize=(10*#Scale#)
X=(0*#Scale#)r
Y=(0*#Scale#)r
Text=%1 %2 %3
AntiAlias=1
InlineSetting=CharacterSpacing | (4*#Scale#) | (4*#Scale#)
Hidden=#Hidden2#

;-------------------------------------------------------------
;-------------------------------------------------------------

[Meter24hClock]
Meter=String
MeasureName=MeasureTime
StringAlign=Center
FontFace=Metropolis Black
FontColor=#Color1#
FontSize=(28*#Scale#)
X=(240*#Scale#)
Y=(140*#Scale#)
Text=%1
AntiAlias=1
Hidden=#Hidden#

[Meter12hClock]
Meter=String
MeasureName=MeasureTime
MeasureName2=MeasureAmPm
StringAlign=Center
FontFace=Metropolis Black
FontColor=#Color1#
FontSize=(28*#Scale#)
X=(0*#Scale#)r
Y=(0*#Scale#)r
Text=%1%2
AntiAlias=1
Hidden=#Hidden2#
InlinePattern=[MeasureAmPm]
InlineSetting=Color | #Color2#
Last edited by balala on December 11th, 2020, 7:14 pm, edited 1 time in total.
Reason: Please use <code> tags whenever are posting code snippets. It's the </> button.
User avatar
balala
Rainmeter Sage
Posts: 16174
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Change am/pm to 24 hour

Post by balala »

Leeroy2608 wrote: December 11th, 2020, 7:13 pm I know this question was asked many times but I can't change my clock from ampm to 24h.
There is an included file (Variables.inc), which we'd need. But even without it, I can say you to change the Format variable within the above file to Format=H (or Format=#H if you'd like to avoid the leading zeros into the hour) and replace the Text=%1%2 option of the [Meter12hClock] meter with Text=%1.
I hope this is enough. If it isn't, post please the content of the @Resources\Variables.inc file.
Leeroy2608
Posts: 9
Joined: October 13th, 2020, 2:35 pm

Re: Change am/pm to 24 hour

Post by Leeroy2608 »

Where can I get this variables.inc ?
Leeroy2608
Posts: 9
Joined: October 13th, 2020, 2:35 pm

Re: Change am/pm to 24 hour

Post by Leeroy2608 »

Leeroy2608 wrote: December 11th, 2020, 9:03 pm Where can I get this variables.inc ?
It's in the @Resources folder of the config in which the skin's .ini file is located. If you don't know which one is, right click the skin and click Edit skin. The code of the skin opens in the default text editor. Check where is located the file. If for instance the file is C:\Users\YourName\Documents\Rainmeter\Skins\illustro\Clock\Clock.ini (this is just an example!), the config is illustro (right into the skins folder) and the @Resource folder is C:\Users\YourName\Documents\Rainmeter\Skins\illustro\@Resources. You can find the Variables.inc file right into it (C:\Users\YourName\Documents\Rainmeter\Skins\illustro\@Resources\Variables.inc -but again, this is just an example).
Leeroy2608 wrote: December 11th, 2020, 9:06 pm Found this one but not sure this is the right thing:
Yep, this is the right file. Replace the Format=#I variable with Format=#H and modify the Text option as described above.
Last edited by balala on December 11th, 2020, 9:18 pm, edited 1 time in total.
Leeroy2608
Posts: 9
Joined: October 13th, 2020, 2:35 pm

Re: Change am/pm to 24 hour

Post by Leeroy2608 »

Didn't help, I now have the same time but without ampm letters. Maybe I did something wrong....
User avatar
xenium
Posts: 867
Joined: January 4th, 2018, 9:52 pm

Re: Change am/pm to 24 hour

Post by xenium »

Leeroy2608 wrote: December 12th, 2020, 6:18 am Didn't help, I now have the same time but without ampm letters. Maybe I did something wrong....
The skin must have a settings menu where you can change the time format.
Post the link where you downloaded the skin
Leeroy2608
Posts: 9
Joined: October 13th, 2020, 2:35 pm

Re: Change am/pm to 24 hour

Post by Leeroy2608 »

xenium wrote: December 12th, 2020, 6:40 am The skin must have a settings menu where you can change the time format.
Post the link where you downloaded the skin
https://www.youtube.com/watch?v=oFJvR_cZYOM
User avatar
balala
Rainmeter Sage
Posts: 16174
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Change am/pm to 24 hour

Post by balala »

Leeroy2608 wrote: December 12th, 2020, 6:53 am https://www.youtube.com/watch?v=oFJvR_cZYOM
Well, in fact this is a link to a YouTube video, presenting the skin. The correct download link is in the comment section of the video: https://www.viralhattrix.com/p/go.html?r=thmsimplify6
Leeroy2608
Posts: 9
Joined: October 13th, 2020, 2:35 pm

Re: Change am/pm to 24 hour

Post by Leeroy2608 »

balala wrote: December 12th, 2020, 6:59 am Well, in fact this is a link to a YouTube video, presenting the skin. The correct download link is in the comment section of the video: https://www.viralhattrix.com/p/go.html?r=thmsimplify6
Yep, sorry, missed that
User avatar
xenium
Posts: 867
Joined: January 4th, 2018, 9:52 pm

Re: Change am/pm to 24 hour

Post by xenium »

If the skin you installed is Retto (https://www.deviantart.com/apexxx-sensei/art/Retto-834702982) follow the steps:
Reinstall the skin (because you have already made some changes)
Then (as mentioned in the skin description) right click on the weather skin go to Custom skin actions and select 24H Time