Jump to content

php date() function


heshan

Recommended Posts

Here is how I would do it.

 

<?php
date_default_timezone_set ("America/New_York"); // set the default timezone
$today = date("d M Y h:i A"); 
echo $today 
?>

 

To view supported time zones, refer to:

 

http://php.net/manual/en/timezones.php

 

Alternatively, you can also set the default time zone in your php.ini file if you have access to it.

Link to comment
https://forums.phpfreaks.com/topic/209599-php-date-function/#findComment-1094454
Share on other sites

  • 2 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.