Page 1 of 1

HTML templates uploading - timestamps

Posted: Sat Feb 14, 2009 1:40 pm
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?

Re:HTML templates uploading - timestamps

Posted: Sat Feb 14, 2009 1:55 pm
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?

Re:HTML templates uploading - timestamps

Posted: Sat Feb 14, 2009 5:17 pm
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"?

Re:HTML templates uploading - timestamps

Posted: Sat Feb 14, 2009 6:03 pm
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.

Re:HTML templates uploading - timestamps

Posted: Mon Mar 02, 2009 5:40 pm
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.

Re:HTML templates uploading - timestamps

Posted: Mon Mar 02, 2009 5:58 pm
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]

Re:HTML templates uploading - timestamps

Posted: Mon Mar 02, 2009 6:27 pm
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]

Re:HTML templates uploading - timestamps

Posted: Mon Mar 02, 2009 6:34 pm
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

Re:HTML templates uploading - timestamps

Posted: Mon Mar 02, 2009 6:43 pm
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

Re:HTML templates uploading - timestamps

Posted: Tue Mar 03, 2009 4:01 pm
by citi
thank you it's working.