Sandaysoft

Support forum for Cumulus weather station software
It is currently Thu May 23, 2013 2:17 am
Please click here before posting. Help me to help you!
Useful Links: Cumulus FAQ • Enhancement requests • Wiki (documentation)
Please put your approximate location into your profile
Add your web site to the Cumulus user map
Vantage Pro2 users with firmware 3.00 should upgrade to fw 3.12 and Cumulus 1.9.4

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: webtags time/date issue
PostPosted: Thu Jan 05, 2012 1:17 am 
Offline

Joined: Fri Sep 30, 2011 6:52 pm
Posts: 5
Location: SLC, UT
Weather Station: Davis Vantage Pro
Operating System: XP Home
Hi,

This seems like a simple problem but I haven't been able to solve it. I'm trying to export a single line of data from cumulus that I use to tack on to an existing data file. (I have cumulus process but not ftp a csv file and then copy, rename and ftp the processed csvtmp file with a batch file. This works great but I can't seem to get it to output the time/date format we need.
Here's the current webtags:
<#date> <#<time>,<#temp>,<#dew>,<#wspeed>,<#avgbearing>,<#press>,<#rfall>,<#intemp>

What I need is the time stamp in this format:
mm/dd/yyyy hh:nn (that's hour:minute)
I've tried about 10 variations on the initial two tags and only get a space where the time should be. Can someone suggest the correct webtag before I lose my mind? (I'm doing this over a super slow satellite connection so it takes a looong time to debug anything and all data gets uploaded to a remote system where I then have to manually enter all the timestamps if they aren't on the data, to keep the data up to date). I'm starting to think it has a cached copy of a file somewhere and isn't actually seeing any of the changes I make to the csv file. Any suggestions would be greatly appreciated.

A few variations I've tried that don't yield anything but a date and a space e.g. "2012/1/4 ,...rest of the data here). BTW I believe this was working fine with an earlier version of the file so I'm not sure what changed.
<#date> <#<time>,
<#date> <#timehhmmss>
<#date> <#timehhmmss format=hh:nn>,,
<#date> <#timehhmmss format="hh:nn">,
<#date> <#hour>:<#minute>,

Thanks!

Tim

--
Tim Brown
http://www.timecam.tv Instant timelapse for your webcam


Top
 Profile  
 
 Post subject: Re: webtags time/date issue
PostPosted: Thu Jan 05, 2012 1:41 am 
Online
User avatar

Joined: Tue Dec 09, 2008 1:37 pm
Posts: 1846
Location: Dudley, West Midlands, UK
Weather Station: None !
Operating System: XP SP3
TimeScience wrote:
Here's the current webtags:
<#date> <#<time>,<#temp>,<#dew>,<#wspeed>,<#avgbearing>,<#press>,<#rfall>,<#intemp>

What I need is the time stamp in this format:
mm/dd/yyyy hh:nn (that's hour:minute)

<#date> <#<time>,
However; <#time> is the date and time with some "English" - this (below) should have worked !
Quote:
<#date> <#hour>:<#minute>,
Double check your syntax and make sure your editor isn't doing anything strange with < and >

_________________
Image
......................Imagine, what you will KNOW tomorrow !


Last edited by beteljuice on Thu Jan 05, 2012 12:09 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: webtags time/date issue
PostPosted: Thu Jan 05, 2012 4:11 am 
Offline

Joined: Fri Sep 30, 2011 6:52 pm
Posts: 5
Location: SLC, UT
Weather Station: Davis Vantage Pro
Operating System: XP Home
Success!

Thanks beteljuice!

Nothing like a 20 second delay between every click you do and a response by the remote computer to make you go slowly crazy while debugging.

I think the stray "<" was the culprit. That and the fact that the format function seems to require quotes around all text despite what the webtags documentation says: From 1.9.1 most time webtags will accept an option 'format' parameter, e.g: <#YearTempHT format=hh:nn> (http://wiki.sandaysoft.com/a/Webtags#Ti ... _Parameter). This example does not work, (at least not for me, when applied to the <#date> function). I'm guessing the second example with the quotes would work.

This sequence produces the desired result:
<#date> <#time format="hh:nn">,<#temp>,<#dew>,<#wspeed>,<#avgbearing>,<#press>,<#rfall>,<#intemp>

This also works and is a bit cleaner:
<#time format="mm/dd/yyyy hh:nn">,<#temp>,<#dew>,<#wspeed>,<#avgbearing>,<#press>,<#rfall>,<#intemp>


Top
 Profile  
 
 Post subject: Re: webtags time/date issue
PostPosted: Thu Jan 05, 2012 8:31 am 
Offline
Site Admin
User avatar

Joined: Mon Jun 02, 2008 6:49 pm
Posts: 17567
Location: Sanday, Orkney
Weather Station: Davis VP2
Operating System: Windows Home Server 2011
TimeScience wrote:
the format function seems to require quotes around all text despite what the webtags documentation says: From 1.9.1 most time webtags will accept an option 'format' parameter, e.g: <#YearTempHT format=hh:nn> (http://wiki.sandaysoft.com/a/Webtags#Ti ... _Parameter). This example does not work, (at least not for me, when applied to the <#date> function).


I can't get this to fail. <#date format=hh:nn> without any quotes works fine for me, producing the text 08:27 just now. I don't know why it apparently doesn't work for you. I'm using a number of tags with the format parameter and no quotes, and they all work as documented.

_________________
Steve
Sanday Weather
----------------------------------------------------------------------------------------------------------------------------------
Like Cumulus and want to support it? Please donate! Image


Top
 Profile  
 
 Post subject: Re: webtags time/date issue
PostPosted: Thu Jan 05, 2012 12:11 pm 
Online
User avatar

Joined: Tue Dec 09, 2008 1:37 pm
Posts: 1846
Location: Dudley, West Midlands, UK
Weather Station: None !
Operating System: XP SP3
Possibly 'overlooked' the space he wanted which then necessitated the quotes ?

_________________
Image
......................Imagine, what you will KNOW tomorrow !


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group