It is currently July 31st, 2021, 5:14 am

Covid-19 Remake

RSS, ATOM and other feeds, GMail, Stocks, any information retrieved from the internet
mak_kawa
Posts: 908
Joined: December 30th, 2015, 9:47 am

Re: Covid-19 Remake

Post by mak_kawa »

Hi iQeem

I suppose that you want to display Update time as your local time? If so...

The update time of the virusncov.com seems to be shown in the time zone of +7 (of SE Asia?). To convert it to your local time, your time zone value is needed.
Sample code for Netherland is as follows. You can integrate this code to your skin, but take care of the consistency especially in measure name.

Code: Select all

[Rainmeter]
Update=1000
BackgroundMode=2
SolidColor=192,192,192,192

[Variables]
Country=netherlands
tZone=0
LocalTimeName=CEST

[MeasureOverall]
Measure=WebParser
URL=https://virusncov.com/covid-statistics/#Country#/
RegExp=(?siU)<i class="recordLed live">.*<small>(.*)</small>.*Total Cases: <strong>(.*)</strong>.*<strong class="red-text">(.*)</strong>.*<strong class="red-text">(.*)</strong>.*Deaths/ Total Cases: (.*)</small>.*<strong class="green-text">(.*)</strong>.*Recovered/ Total Cases: (.*)</small>

[MeasureUpdated]
Measure=WebParser
URL=[MeasureOverall]
StringIndex=1
Substitute="":"Updating...","Last updated:":""," UTC+7":""

[UpdateTime]
Measure=Time
TimeStamp=[MeasureUpdated]
TimeStampFormat=%Y-%m-%d %H:%M:%S
DynamicVariables=1

[UpdateWindowsTime]
Measure=Calc
Formula=([UpdateTime:Timestamp]+((#tZone#-7)*60*60))
DynamicVariables=1

[ConvertUpdateTime]
Measure=Time
TimeStamp=[UpdateWindowsTime]
Format=%Y-%m-%d %H:%M:%S #LocalTimeName#
DynamicVariables=1

[MeterUpdated]
Meter=String
MeasureName=MeasureUpdated
MeasureName2=ConvertUpdateTime
Text=%1#CRLF#%2
dvo
Posts: 1081
Joined: February 7th, 2016, 6:08 am

Re: Covid-19 Remake

Post by dvo »

update : dutch critical are fixed 30 may 14.15