• Is there anyway to chnage the internal clock on my WP to be the same time that it is where I live? Becuase where I live today is still the 21 but my claendar says its the 22. Is there any code or option im jus looking over to chnage teh clock? If so please tell me, thanks! -Ian(https://www.pernundle.net/blog/)

Viewing 3 replies - 1 through 3 (of 3 total)
  • joh,
    as it was said in this thread, too, changing the time in the options page does not affect the calendar’s clock or whatever is in there. I mean the posting time will be correct, but the calendar jumps to the next day not according to the blogger’s settings.

    To further explain moshu’s reply…. it mainly has to do with where your server is located.
    Tg

    Here is a piece of PHP code that will let you show the time and offset it from your server time so you can make it whatever you like:
    It is displayed at the bottom of one of my sites: https://www.rickandmonika.com
    <?php // melbdate.php3
    rename file extension from .txt to .php3
    // or to .php (updated April 2003)
    // Script copyright (C) 2000 Dean Kennedy, Terrabyte Communications
    // Version 1.02 06 November 2003
    // Free to use, modify and copy so long as you leave the above
    // two lines in comments. You can safely delete all other comments
    // and just leave the four line script
    // Distributed under the terms of the GNU General Public License (GPL).
    // Because it is licensed free of charge, there is NO WARRANTY, it is
    // provided AS IS. The author can not be held liable for any damage that
    // might arise from the use of this software. Use it at your own risk.
    // https://www.gnu.org/copyleft/gpl.html
    // To adjust the format of the date, see the list of variables at the
    // official PHP site (php.net): https://www.php.net/manual/function.date.php
    //
    // If your local time is *behind* the server time, then change the "+" to
    // a "-" in the $melbdate line
    //
    // Keep in mind that you'll have to update the $hourdiff variable within the
    // script when your *local* daylight saving time/standard time changes, if
    // it is a different setting to the server daylight saving/standard time
    // Variable for hours
    $hourdiff = "8"; // hours difference between server time and local time
    // If you don't know how many hours, then "uncomment" the three lines
    // below by deleting "// " to see what the server time is (remember to
    // put the comments "// " back when you've finished checking:
    // $serverdate = date("l, d F Y h:i a");
    // print ("$serverdate");
    // print (" &nbsp; ");
    // Nothing needs to be changed below here unless you want to change
    // the format of the date (see above for URL of options) or your local
    // time is behind the server time
    $timeadjust = ($hourdiff * 60 * 60);
    $melbdate = date("h:i a",time() + $timeadjust);
    print ("$melbdate");?>

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Clock Time’ is closed to new replies.