Picnic Website Code Tutorials

PHP Display Current Date and Time


PHP Current Date and TimeHow to display the current date and time using PHP? This is how. FYI - you cannot echo the specific users timezone using PHP. For that you need JS. But you can set your prefered timezone using the snippet below and then just say "Pacific Standard Time" as I did.

PHP Date/Time Snippet

    echo date("m/d/Y - H:i:s A", time());
?> PST

Will Display This...

02/21/2018 - 19:10:42 PM PST

Need help adding this or other code to your website? Post it here in the forum! Forum


Top Donators

Friends of Mine