Page 1 of 1
Date and Time Format Change
Posted: Thu 08 Jul 2010 2:56 pm
by PCBob
Is it possible to change the date format to: MM/DD/YYYY
and
Time to HH:MM 12 hour clock
Whe I write out to the HTML templates?
I have done a search through the forum and found some material on the local machine format and my local machine is set to how I prefer it.
No big deal just thought it would be another excuse to go in and tweak my page.
Thanks
Bob
Re: Date and Time Format Change
Posted: Thu 08 Jul 2010 3:10 pm
by steve
Which dates aren't coming out in that format? It should be using your machine format for most dates?
12-hour time format is tricky with the Cumulus code as it stands now; I didn't envisage anyone wanting to use that format, as 24-hour format is pretty much the meteorological standard. I think you would have to use some javascript (or something like that) to convert.
Re: Date and Time Format Change
Posted: Sun 11 Jul 2010 1:07 am
by PCBob
I'll scratch the 12 hour deal.
What I see in the DD MM YYYY format is mostly the all time records like:
<#TrrateM>
<#TrfallhH>
<#TrfallH>
<#TrfallmH>
I would like them and all the dates to be mmddyyyy which is how my PC system clock is set.
Thanks for any tips
Bob
Re: Date and Time Format Change
Posted: Sun 11 Jul 2010 8:40 am
by steve
Ah, yes, the all-time record dates are actually all in the format "24 February 2010", with the full string being something like "at 05:19 on 24 February 2010", which is, I admit, somewhat inflexible. It was my attempt at creating a format which didn't have the usual US vs Rest of the World ambiguity. At the moment, I think the only way you could alter that is by javascript (read in the string, parse it, write it back out in your chosen format). I guess in the longer term, I could introduce more web tags for those with alternative formats, or perhaps better, a way of configuring the format.
Re: Date and Time Format Change
Posted: Mon 12 Jul 2010 12:55 am
by PCBob
No worries Steve at all, just wanted to make sure I wasn't missing something simple. If I can't look for things to tweak it's not a hobby right?
Take care
Re: Date and Time Format Change
Posted: Mon 12 Jul 2010 7:27 am
by steve
PCBob wrote:No worries Steve at all, just wanted to make sure I wasn't missing something simple. If I can't look for things to tweak it's not a hobby right?
Absolutely. You could always have a play with javascript, it's something I want to do but haven't had the time.