<?php
// set the default timezone to use. Available since PHP 5.1
date_default_timezone_set('Etc/GMT+5');
// Prints something like: Monday
echo date("l");
// Prints something like: Monday 8th of August 2005 03:12:46 PM
echo date('l jS \of F Y h:i:s A');
/* use the constants in the format parameter */
// prints something like: Wed, 25 Sep 2013 15:28:57 -0700
echo date(DATE_RFC2822);
// prints something like: 2000-07-01T00:00:00+00:00
echo date(DATE_ATOM, mktime(0, 0, 0, 7, 1, 2000));
?>
ThursdayThursday 2nd of April 2015 03:09:37 AMThu, 02 Apr 2015 03:09:37 -05002000-07-01T00:00:00-05:00
Output for 8.3.5
Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
ThursdayThursday 2nd of April 2015 03:09:37 AMThu, 02 Apr 2015 03:09:37 -05002000-07-01T00:00:00-05:00
Output for 5.1.1 - 5.1.2
ThursdayThursday 2nd of April 2015 03:09:37 AMThu, 02 Apr 2015 03:09:37 -05002000-07-01T00:00:00-0500
Output for 5.1.0
ThursdayThursday 2nd of April 2015 03:09:37 AM
Notice: Use of undefined constant DATE_RFC2822 - assumed 'DATE_RFC2822' in /in/D09L0 on line 14
ThuAMGMT+5E_RAprilC2822
Notice: Use of undefined constant DATE_ATOM - assumed 'DATE_ATOM' in /in/D09L0 on line 17
SatAMGMT+5E_AMGMT+5-0500Jul
Output for 5.0.0 - 5.0.5
Fatal error: Call to undefined function date_default_timezone_set() in /in/D09L0 on line 3
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: date_default_timezone_set() in /in/D09L0 on line 3
Process exited with code 255.
Output for 4.3.2 - 4.3.11, 4.4.0 - 4.4.4
Fatal error: Call to undefined function: date_default_timezone_set() in /in/D09L0 on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: date_default_timezone_set() in /in/D09L0 on line 3