HTML templates uploading - timestamps

Moderator: Mattk

Post Reply
HLucas01
Junior Boarder
Junior Boarder
Posts: 20
Joined: Sat Feb 14, 2009 1:22 pm
Location: Montfort in the Netherlands

HTML templates uploading - timestamps

Post by HLucas01 »

I am creating a webpage on which I want to present some information on minimum and maximum values on all the sensorreadings for different periods (60min, 24hour, 1month et cetera).
Everything works fine using the template functionality as mentioned in chapter 3.4 of the manual Boris wrote.
But the timestamp fields (e.g. [last24h_th0_dewmin_time] give returns in the format "YYYYMMDDHHMMSS" and are all in standard UTC time, not local time (that is -1 hour).
Using the formula functionality can do the trick (#IJ gives the hour), but it is very timeconsuming to do this for all timestamps on all sensors.
Does anyone have a quick method to change the format of the returns into "DD-MM-YY HH:MM" and adding the 1 hour time difference?
skyewright
Platinum Boarder
Platinum Boarder
Posts: 873
Joined: Fri Jan 25, 2008 6:27 pm
Location: Isle of Skye, Scotland

Re:HTML templates uploading - timestamps

Post by skyewright »

HLucas01 wrote:...and are all in standard UTC time, not local time (that is -1 hour).
Do you have Settings => Weather Time Zone use local time instead of UTC, ticked?
HLucas01
Junior Boarder
Junior Boarder
Posts: 20
Joined: Sat Feb 14, 2009 1:22 pm
Location: Montfort in the Netherlands

Re:HTML templates uploading - timestamps

Post by HLucas01 »

No, i didn't. Changing this setting has solved the first part of the problem, thanks !
Question number 2 remains: does anybody know a " smart" method to change the format of the returns "YYYYMMDDHHMMSS" into "DD-MM-YY HH:MM"?
skyewright
Platinum Boarder
Platinum Boarder
Posts: 873
Joined: Fri Jan 25, 2008 6:27 pm
Location: Isle of Skye, Scotland

Re:HTML templates uploading - timestamps

Post by skyewright »

HLucas01 wrote:" smart" method to change the format of the returns "YYYYMMDDHHMMSS" into "DD-MM-YY HH:MM"?
Once you have date and or time set up for one variable "the hard way", doing another isn't much trouble if you use copy, paste, then search & replace to change the copied variable to the new one?

That's what I do.
citi
Junior Boarder
Junior Boarder
Posts: 25
Joined: Thu Feb 05, 2009 10:51 am

Re:HTML templates uploading - timestamps

Post by citi »

I have the same problem about to change the format date but I don't understand your advice....:blush:
could you write the HTML code, thank you.
AAMFlyer
Gold Boarder
Gold Boarder
Posts: 213
Joined: Mon Aug 11, 2008 12:55 am
Location: Arvada, CO

Re:HTML templates uploading - timestamps

Post by AAMFlyer »

Your coding would look something like this...of course I'm showing this in a WYSIWYG Format as I don't have my actual html code here at work...then you would just copy this throughout... I use something similar for a text only mobile to break out the date and time in a USA reading....

http://westwoodsweather.com/weather/mobile.html

Date/Time: [actual_date0_day_local]/[actual_date0_month_local]/[actual_date0_year_local] - - [actual_date0_hour_local]:[actual_date0_min_local]
HLucas01
Junior Boarder
Junior Boarder
Posts: 20
Joined: Sat Feb 14, 2009 1:22 pm
Location: Montfort in the Netherlands

Re:HTML templates uploading - timestamps

Post by HLucas01 »

I have performed the coding the 'hard way' (as suggested by skyewright and yes, after a while you get used to the repeating of copy/paste/replace).

Perhaps the attached coding gives you a better idea (this is only the presentation of one table-row of temperature data in the table on the home page of my website).

The home page (with all data) and the page header (used on every page showing the actual temperature) are saved on the Meteohub and uploaded every 2 minutes to the website.

If you want to have a look at the live website: http://www.inmontfort.nl [file name=temperature_coding.txt size=1246]http://www.meteohub.de/joomla/images/fb ... coding.txt[/file]
citi
Junior Boarder
Junior Boarder
Posts: 25
Joined: Thu Feb 05, 2009 10:51 am

Re:HTML templates uploading - timestamps

Post by citi »

like that it is not possible because we have only one format date for min and max temperature :
month1_th0_tempmin_time 20090302064508
HLucas01
Junior Boarder
Junior Boarder
Posts: 20
Joined: Sat Feb 14, 2009 1:22 pm
Location: Montfort in the Netherlands

Re:HTML templates uploading - timestamps

Post by HLucas01 »

Yes, but that is what the #xx coding is about: it breaks the one date-time record into small pieces:
#IJ = hour
#KL = minutes
#GH = day
#EF = month
#AD = year
citi
Junior Boarder
Junior Boarder
Posts: 25
Joined: Thu Feb 05, 2009 10:51 am

Re:HTML templates uploading - timestamps

Post by citi »

thank you it's working.
Post Reply