Author Topic: Home Weather Station date/time display  (Read 709 times)

0 Members and 1 Guest are viewing this topic.

Offline lobsterman

  • Senior Contributor
  • ****
  • Posts: 164
    • Cape Small Harbor Weather
Home Weather Station date/time display
« on: March 08, 2017, 10:42:04 PM »
In the top center block the time (in English) is displayed as "MAR WED 8TH". Have I made an error in choosing date/time formats, or can this be corrected to "Weds, Mar 8th"?

Again, I could not find where this is formatted in .css or which .php page. I'm happy to mess with the css or php with a pointer to the right location to do so.

 [ You are not allowed to view attachments ]

Offline weather34

  • Forecaster
  • *****
  • Posts: 1068
    • https://weather34.com/homeweatherstation
Re: Home Weather Station date/time display
« Reply #1 on: March 09, 2017, 12:01:44 PM »
In the top center block the time (in English) is displayed as "MAR WED 8TH". Have I made an error in choosing date/time formats, or can this be corrected to "Weds, Mar 8th"?

Again, I could not find where this is formatted in .css or which .php page. I'm happy to mess with the css or php with a pointer to the right location to do so.

 [ You are not allowed to view attachments ]

hello sure nothing major just swapping the %b and %a around

index.php

<!--realtime clock for homeweatherstation template-->
  <div class="weather2-clock">HOME<strong>WEATHER</strong>STATION<br>
  <div class="clock-container">
               <span style="position:absolute;margin-left:45px;font-size:11px;margin-top:-25px;text-transform:uppercase;">
                <?php echo strftime(" %b") ;?> <?php echo strftime(" %a") ;?> <?php echo date(" jS") ;?></span>

to


<!--realtime clock for homeweatherstation template-->
  <div class="weather2-clock">HOME<strong>WEATHER</strong>STATION<br>
  <div class="clock-container">
               <span style="position:absolute;margin-left:45px;font-size:11px;margin-top:-25px;text-transform:none;">
                <?php echo strftime(" %a") ;?>, <?php echo strftime(" %b") ;?> <?php echo date(" jS") ;?></span>


or just using php date format and lose language support


<!--realtime clock for homeweatherstation template-->
  <div class="weather2-clock">HOME<strong>WEATHER</strong>STATION<br>
  <div class="clock-container">
              <span style="position:absolute;margin-left:45px;font-size:11px;margin-top:-25px;text-transform:none;">
              <?php echo date('D M jS Y');?></span>



you can customise it more using the php documentation http://php.net/manual/en/function.strftime.php or http://php.net/manual/en/function.date.php

brian

Offline lobsterman

  • Senior Contributor
  • ****
  • Posts: 164
    • Cape Small Harbor Weather
Re: Home Weather Station date/time display
« Reply #2 on: March 09, 2017, 12:04:20 PM »
In the top center block the time (in English) is displayed as "MAR WED 8TH". Have I made an error in choosing date/time formats, or can this be corrected to "Weds, Mar 8th"?

Again, I could not find where this is formatted in .css or which .php page. I'm happy to mess with the css or php with a pointer to the right location to do so.

 [ You are not allowed to view attachments ]

hello sure nothing major just swapping the %b and %a around



you can customise it more using the php documentation http://php.net/manual/en/function.strftime.php or http://php.net/manual/en/function.date.php

brian

Perfect Brian, just what I needed. I'm used to the PHP date formatting. Lovely piece of work you've done here.

Offline weather34

  • Forecaster
  • *****
  • Posts: 1068
    • https://weather34.com/homeweatherstation
Re: Home Weather Station date/time display
« Reply #3 on: March 09, 2017, 12:07:03 PM »
In the top center block the time (in English) is displayed as "MAR WED 8TH". Have I made an error in choosing date/time formats, or can this be corrected to "Weds, Mar 8th"?

Again, I could not find where this is formatted in .css or which .php page. I'm happy to mess with the css or php with a pointer to the right location to do so.

 [ You are not allowed to view attachments ]

hello sure nothing major just swapping the %b and %a around



you can customise it more using the php documentation http://php.net/manual/en/function.strftime.php or http://php.net/manual/en/function.date.php

brian

Perfect Brian, just what I needed. I'm used to the PHP date formatting. Lovely piece of work you've done here.

hello

no problem anytime and thank you ..brian

 

anything