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?
HTML templates uploading - timestamps
Moderator: Mattk
-
- Platinum Boarder
- Posts: 873
- Joined: Fri Jan 25, 2008 6:27 pm
- Location: Isle of Skye, Scotland
Re:HTML templates uploading - timestamps
Do you have Settings => Weather Time Zone use local time instead of UTC, ticked?HLucas01 wrote:...and are all in standard UTC time, not local time (that is -1 hour).
-
- Junior Boarder
- Posts: 20
- Joined: Sat Feb 14, 2009 1:22 pm
- Location: Montfort in the Netherlands
Re:HTML templates uploading - timestamps
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"?
Question number 2 remains: does anybody know a " smart" method to change the format of the returns "YYYYMMDDHHMMSS" into "DD-MM-YY HH:MM"?
-
- Platinum Boarder
- Posts: 873
- Joined: Fri Jan 25, 2008 6:27 pm
- Location: Isle of Skye, Scotland
Re:HTML templates uploading - timestamps
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?HLucas01 wrote:" smart" method to change the format of the returns "YYYYMMDDHHMMSS" into "DD-MM-YY HH:MM"?
That's what I do.
Re:HTML templates uploading - timestamps
I have the same problem about to change the format date but I don't understand your advice....
could you write the HTML code, thank you.
could you write the HTML code, thank you.
Re:HTML templates uploading - timestamps
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]
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]
-
- Junior Boarder
- Posts: 20
- Joined: Sat Feb 14, 2009 1:22 pm
- Location: Montfort in the Netherlands
Re:HTML templates uploading - timestamps
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]
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
like that it is not possible because we have only one format date for min and max temperature :
month1_th0_tempmin_time 20090302064508
month1_th0_tempmin_time 20090302064508
-
- Junior Boarder
- Posts: 20
- Joined: Sat Feb 14, 2009 1:22 pm
- Location: Montfort in the Netherlands
Re:HTML templates uploading - timestamps
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
#IJ = hour
#KL = minutes
#GH = day
#EF = month
#AD = year
Re:HTML templates uploading - timestamps
thank you it's working.