There again is my turn to ask something.
I have an extremely simple lua code:
MyLua.lua:
Code: Select all
function Update()
SKIN:Bang('!SetVariable', 'Time', os.time({day=27,month=09,year=2020,hour=1,min=0,sec=0}))
end
The above script file is used into a same way simple skin:
Code: Select all
[Rainmeter]
Update=1000
[MeasureLuaScriptSun]
Measure=SCRIPT
ScriptFile=#@#MyLua.lua
[MeasureTime]
Measure=Time
TimeStamp=2020-09-27 01:00:00
TimeStampFormat=%Y-%m-%d %H:%M:%S
[MeterValues]
Meter=STRING
X=0
Y=0
Padding=15,5,15,5
FontColor=220,220,220
FontEffectColor=0,0,0
StringEffect=Shadow
SolidColor=0,0,0,150
FontSize=8
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=LEFT
AntiAlias=1
Text=#Time##CRLF#[MeasureTime:TimeStamp]
DynamicVariables=1
But the problem is that the two time stamps are extremely different. The time stamp returned by the Rainmeter code is around ten times greater then the time stamp returned by the lua script.
Question is how can I use the time stamp returned by a lua script file into a Time measure. Yes, I know I can use certain time format into the lua script file and return the time stamp this way, then use this into the TimeStamp option of a Time measure (along with a proper TimeStampFormat), but the question is why these time stamp values are so different and if there is a way to use the numeric (not formated) time stamp value directly into a TimeStamp option of a Time measure.
Thanks for any idea.