It is currently April 20th, 2024, 3:25 am

Simple clock help

Get help with creating, editing & fixing problems with skins
nawmtaronyu
Posts: 64
Joined: July 21st, 2010, 3:30 am

Simple clock help

Post by nawmtaronyu »

Ok I got the code working right but i want to make it a time zone

[Rainmeter]
24Hclock By Nawmtaronyu
Update=1000

;Metadata added by RainBrowser
;http://rainmeter.net/RainWiki/index.php?

title=Rainmeter_101#.5BMetadata.5D

[Metadata]
Name=24Hclock
Config=
Description=
Instructions=
Version=
Tags=
License=
Variant=
Preview=

;End of added Metadata

[Variables]
Font=Birth of a hero
Colour=255,255,255

[Measures]

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


[Meters]

[MeterTime]
MeasureName=MeasureTime
Meter=String
FontSize=55
FontColor=#Colour#
FontFace=#Font#
AntiAlias=1


And I want to to make it so it adds an hour to my time say my time is 9:30 I want it to read 10:30 even though it is 9:30


Edit: Also i dont know how to add words under the Time such as GMT-6where the GMT-6 does not change
Image
D_Reckoning
Posts: 10
Joined: July 14th, 2010, 10:15 pm

Re: Simple clock help

Post by D_Reckoning »

First off, I'm not sure if you want the time-zone to change dynamicly, or just be static. With your second question in mind, I'm going to assume you desire static :)

This is achieved like so:

Code: Select all

[Measures]

[MeasureTime]
Measure=Time
Format=%#H.%M

[MeasureTimeMod]
Measure=Calc
Formula=(MeasureTime+1)
Substitute=".":":"

[Meters]

[MeterTime]
MeasureName=MeasureTimeMod
Meter=String
FontSize=55
FontColor=#Colour#
FontFace=#Font#
AntiAlias=1
What we've done here is change the ':' in the original measure for a '.' - this will give a result that 'Calc' can handle mathematicly.

We then have a second measure, [MeasureTimeMod], that simply adds 1 to the hours (change as desired), then substitutes the '.' for a ':' - this is highly optional, but changes back the format to the standard displaying of time (h:m instead of h.m)

For the second bit, there's two ways to go about it: either you add a 'Postfix=" GMT-6"' to the meter (will write the stuff after the value it displays), or you can simply add a second meter (meter=string), and make that one display the text - wherever you may want it ;)

Hope that helps :)