• Welcome to TodayPlus Boards v2.
 

[updatetime] for weather/rss

Started by arbitrajeu, November 04, 2003, 08:30:03 AM

Previous topic - Next topic

arbitrajeu

Prompted by a question from TransFXB I started to confidently write a reply about how to display the update time for weather forecast information...

... but, when I looked at the skin reference and tried to correlate it with my skin and observations of its behaviour, I realised I didn't actually understand how it works.

The skin reference states that the text,x,y,[updatetime]... command displays the refresh time for the region.  I'd like to understand which region this refers to, as it doesn't tally with what I see on my PocketPC.  In my skin I use pages in region,9 to load the weather data, and page 0 in region 0 to display it.  A snippet is:

.
.
region,9,2,-1
load,city,3
storevar,var3=1
storevar,var4=3
endregion,9,2

region,9,3,-1
load,city,4
storevar,var3=2
storevar,var4=0
endregion,9,3

// Region 0, Page 0
region,0,0,-1
defregion,0,0,0,240,59,7
offset,offset_-1,offset_-1
offsetadd,0,1

// display last update time for current location
changefont,tahoma,10,b
text,28,45,[updatetime],l,HH:mm
changefont,tahoma,12,

Now, this all works fine.  I just hate not knowing why it works.  I can refresh my different weather feeds at different times and it correctly displays the refresh time for each location... not for the region.

So, is the update time associated with the specific page in region 9, or is it cunningly taken from the cityx.txt.time file?  Whichever of these it is, I'd like to understand it better, as I have a feature in mind which might have weather for two locations being displayed at the same time, in different regions (possibly both requiring update times).

Thanks in advance.
[size=14]arbitrajeu[/size]
[size=12]todayplus moderator[/size]
[size=10]
iPAQ 3970, Windows Mobile 2003, 256MB SD, AgendaFusion 5[/size]

TransFXB

arbitrajeu,

My understanding is that it comes from the buffer, ie cityx.txt file and it is ET time, not local time. That's the reason of my question.

Thanks for your interest in my question. I hope you will find the answer to your question.

TransFXB

LightMan

For what I understand, it's taken from the buffer files and it also works with the RSS feeds...in a modified version of my Minimize, I update the region that holds the update time whenever I change a RSS page and the update time changes as well.

Anyway, it always seems to be displayed in local time, so perhaps it uses the PPC timezone in the regional settings?

Is this true srs or am I being mislead by something else?
[size=9]-= Ipaq 2215, 1 Gb CF, 512 Mb SD, Crystal Clear case =-[/size]

srs

the [updatetime] is pulled from the last load command (and each different rss / city has its own (maybe different) update time).  So whatever you loaded last is whats displayed by the [updatetime].  The [updatetime] refers to the time the data was download from the internet.

note that the weather feed also has an update time.  this refers to the time which the weather was updated on the feed, and is always displayed is eastern time.

arbitrajeu

Quote from: srsthe [updatetime] is pulled from the last load command (and each different rss / city has its own (maybe different) update time).  So whatever you loaded last is whats displayed by the [updatetime].  The [updatetime] refers to the time the data was download from the internet.
Great, that really helps.  To be absolutely clear, the piece of code that I snipped out of the last example is the key one:

// display buttons to switch between weather locations
imagebutton,2,44,left_arrow.png,t,9,4,%var3%,-1
imagebutton,15,44,right_arrow.png,t,9,4,%var4%,-1

// display last update time for current location
changefont,tahoma,10,b
text,28,45,[updatetime],l,HH:mm
changefont,tahoma,12,


Here the image buttons are switching the various pages of region 9, which actually loads the weather data from the cityx.txt file, and sets the updatetime from the cityx.txt.time files?
[size=14]arbitrajeu[/size]
[size=12]todayplus moderator[/size]
[size=10]
iPAQ 3970, Windows Mobile 2003, 256MB SD, AgendaFusion 5[/size]

TransFXB

Allright, but the problem is that if you have not updated from internet since more than one day, the last update time indicates a time that could be yesterday but you have no indication on the DATE of the last update.
Unless I am wrong.

TransFXB

arbitrajeu

Quote from: TransFXBAllright, but the problem is that if you have not updated from internet since more than one day, the last update time indicates a time that could be yesterday but you have no indication on the DATE of the last update.
Unless I am wrong.
You're not wrong.  You can only display the time of last update.  Feature Request?
[size=14]arbitrajeu[/size]
[size=12]todayplus moderator[/size]
[size=10]
iPAQ 3970, Windows Mobile 2003, 256MB SD, AgendaFusion 5[/size]