I have a skin that retrieves an Unix timestamp from a website. I'm trying to convert this to the regular Windows time but it's not showing the time in my timezone (GMT+8):
Code:
[Rainmeter]Update=1000BackgroundMode=2SolidColor=0,0,0,150AccurateText=1DynamicWindowSize=1---------------------------------------------------------------------------------; MEASURES---------------------------------------------------------------------------------[MeasureWorldBoss]Measure=WebParserURL=https://www.wowhead.com/diablo-4/event-timersRegExp=(?siU)<script type="application/json" id="data.d4.worldBosses.status">\{"bossName":"(.*)","spawns":\[\{"pending":.*,"active":(.*),"end"][MeasureWorldBossName]Measure=WebParserURL=[MeasureWorldBoss]StringIndex=1[MeasureWorldBossSpawnTime]Measure=WebParserURL=[MeasureWorldBoss]StringIndex=2[MeasureUnixTimeToWindowsTime]Measure=Calc; To get a Windows timestamp, which is what Rainmeter uses, you take a unix timestamp and add 11644473600 to it.Formula=[MeasureWorldBossSpawnTime]+11644473600DynamicVariables=1[MeasureTimeConverted]Measure=TimeTimeStamp=[MeasureUnixTimeToWindowsTime]Format=%A, %B %#d, %Y %#I:%M %pDynamicVariables=1---------------------------------------------------------------------------------; METERS---------------------------------------------------------------------------------[MeterWorldBoss]Meter=StringMeasureName=MeasureWorldBossNameMeasureName2=MeasureTimeConvertedX=0Y=0FontColor=255,255,255FontSize=15AntiAlias=1Text="%1 spawns at %2"DynamicVariables=1
Statistics: Posted by ZipD — Yesterday, 10:31 pm — Replies 6 — Views 126