PHP Time Script Echos Different Time from Current System Time

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Easytime
    New Member
    • Nov 2012
    • 26

    PHP Time Script Echos Different Time from Current System Time

    Dear Programmers,

    I have lifted a php script code to echo the current time.

    When I run the script, it echos a different time string from the current system time.

    Please find the php time script below. Please what could be the possible cause of this and how can I debug it?

    Thank you!
    Code:
    <?php
    
    date_default_timezone_set('UTC');
    
    
    // Prints something like: Monday 8th of August 2005 03:12:46 PM
    echo date('l jS \of F Y h:i:s A')."<br/>";
    
    ?>
  • zmbd
    Recognized Expert Moderator Expert
    • Mar 2012
    • 5501

    #2
    Take a very carefull read of line 3...
    Also... when posting questions, if you would give an example of what the program was supposed to output vs. what the code does output that would help too - and erros... with exact title, number, and text.

    Comment

    Working...