Author Topic: ajax-dashboard6 to 24 hour clock  (Read 507 times)

0 Members and 1 Guest are viewing this topic.

Offline Gert Woerden

  • Member
  • *
  • Posts: 32
ajax-dashboard6 to 24 hour clock
« on: December 26, 2020, 12:52:41 PM »
Hi to you all
I have the ajax-dashboard6.php - Version 6.95c  for my website
But I have into the time  PM/AM   ( see photo  red  circle )
  but I need the 24 hour clock into it
I have look… but I  think all is ok into the files
$timeFormat = 'd/m/Y H:i';  // Fri, 31-Mar-2006 6:35pm TZone
//$timeFormat = 'd-M-Y g:ia';  // Fri, 31-Mar-2006 6:35pm TZone
//$timeOnlyFormat = 'g:ia';    // h:mm[am|pm];
$timeOnlyFormat = 'H:i';     // hh:mm
$dateOnlyFormat = 'd-M-Y';   // d-Mon-YYYY
Some now what’s wrong
Thanks   
Gert
website =  https://www.weerstation-woerden.nl


Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: ajax-dashboard6 to 24 hour clock
« Reply #1 on: December 26, 2020, 09:10:39 PM »
You are missing heavens.php which needs to be saved from the link here and then customized to your site.
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline the beteljuice

  • the beteljuice
  • Forecaster
  • *****
  • Posts: 316
    • test site
Re: ajax-dashboard6 to 24 hour clock
« Reply #2 on: December 26, 2020, 09:59:23 PM »
You seem to have fixed it in the ajax file for Metric, but not for Imperial  ;)
Imagine what you will KNOW tomorrow !

Offline Gert Woerden

  • Member
  • *
  • Posts: 32
Re: ajax-dashboard6 to 24 hour clock
« Reply #3 on: December 27, 2020, 03:16:26 AM »
thanks for the heavens.php 
I have it now on the server
and I have the heavenpie.png on the board   thanks !!!
only my clock is still into  am/pm mode
just like before  the clock on-top is into 24 mode  and the clock below that is into am/pm mode   very strange

update !!!!!!
I see now that the 2e clock works into 24 mode  but this is into FireFox and google Chrome    but into Microsoft Edge its into am/pm mode 
now clean all the internet files on the computer ( ccleaner)   now also the 2e clock is ok   
puffff   Finally 
thanks for the help   greetings   Gert     


You are missing heavens.php which needs to be saved from the link here and then customized to your site.

Offline Gert Woerden

  • Member
  • *
  • Posts: 32
Re: ajax-dashboard6 to 24 hour clock
« Reply #4 on: December 27, 2020, 03:20:07 AM »
yes I see  don't know how  but on-top its works with  Imperial  on the second clock  not   strange

You seem to have fixed it in the ajax file for Metric, but not for Imperial  ;)

Offline the beteljuice

  • the beteljuice
  • Forecaster
  • *****
  • Posts: 316
    • test site
Re: ajax-dashboard6 to 24 hour clock
« Reply #5 on: December 27, 2020, 06:10:11 AM »
In ajaxWDwx3.js you have differing time display between Metric and Imperial.
Code: [Select]
//==============================================================================
// UNITS-OF-MEASURE / UOM (optional)
// ... change to your desired UOM's and decimal places
//==============================================================================
// ENGLISH (Imperial)
var imperialUOM =
   {Temp: '°F' // [ &dec;C | &dec;F ] ......................... Temp
   ,Wind: 'mph'    // [ kts | mph | kph  | m/s  ] ................. Wind
   ,Baro: 'inHg'   // [ hPa | mb  | inHg | mmHg ] ................. Baro
   ,Rain: 'in'     // [ mm  | in  ] ............................... Rain
   ,Soil: 'in'     // [ cm  | in  ] ............................... Soil Sensor Depth
   ,Moist:'cb'    // [ kp  | cb  ] ............................... Soil Moisture
   ,Snow: 'in'     // [ cm  | in  ] ............................... Snow
   ,Alti: 'ft'     // [ m   | ft  ] ........................... Altitude
   ,Dist: 'miles'  // [ m   | km  | miles] .................... Distance
   ,Deg : '°'  // [ deg | ° ] ..................... Direction/UV
   ,dateFmt: "m/j/Y"   // 04/26/2009 ... same format as "date" function in php ( eg. for US use "m/j/Y", for GB use "d/M/Y" )
   ,timeFmt: "g:i:s a" // 3:27:01 pm ... same format as "date" function in php ( for 24h clock use "H:i:s" )
   ,timeHM : "g:i a"   // 3:27 pm ...... same format as "date" function in php ( for 24h clock use "H:i" )
   };
var imperialDP = // decimal places
   { Temp:1 ,Wind:1 ,Baro:2 ,Rain:2 ,Soil:0 ,Moist:0 ,Snow:2 ,Alti:0 ,Dist:2 ,UV:0 };
//----------------------------------------------------------------------
// METRIC
var metricUOM =
   {Temp: '°C' // [ &dec;C | &dec;F ] ..........................Temp
   ,Wind: 'kph'    // [ kts | mph | kph  | m/s  ] ................. Wind
   ,Baro: 'hPa'    // [ hPa | mb  | inHg | mmHg ] ................. Baro
   ,Rain: 'mm'     // [ mm  | in  ] ............................... Rain
   ,Soil: 'cm'     // [ cm  | in  } ............................... Soil Sensor Depth
   ,Moist:'kp'    // [ kp  | cb  ] ............................... Soil Moisture
   ,Snow: 'cm'     // [ cm  | in  ] ............................... Snow
   ,Alti: 'm'      // [ m   | ft  ] ........................... Altitude
   ,Dist: 'km'     // [ m   | km  | miles] .................... Distance
   ,Deg : '°'  // [ deg | ° ] ........................ Direction
   ,dateFmt: "j-M-Y" // 26-04-2009 ... same format as "date" function in php (eg. for DE use "j.M.Y", for NL use "j-M-Y)
   ,timeFmt: "H:i:s" // 15:27:01 ..... same format as "date" function in php  ( for 12h clock use "g:i:s a" )
   ,timeHM : "H:i"   // 15:27 ........ same format as "date" function in php  ( for 12h clock use "g:i a" )
   };
var metricDP = // decimal places
   { Temp:1 ,Wind:1 ,Baro:0 ,Rain:1 ,Soil:0 ,Moist:0 ,Snow:2 ,Alti:0 ,Dist:2 ,UV:0 };
Imagine what you will KNOW tomorrow !

Offline Gert Woerden

  • Member
  • *
  • Posts: 32
Re: ajax-dashboard6 to 24 hour clock
« Reply #6 on: December 27, 2020, 07:01:55 AM »
I Know I have the same

In ajaxWDwx3.js you have differing time display between Metric and Imperial.
Code: [Select]
//==============================================================================

[/quote]

Offline the beteljuice

  • the beteljuice
  • Forecaster
  • *****
  • Posts: 316
    • test site
Re: ajax-dashboard6 to 24 hour clock
« Reply #7 on: December 27, 2020, 08:30:59 AM »
err ...
That was a cut'n'paste of YOUR code  ;)
Imagine what you will KNOW tomorrow !