View Full Version : PHP date and time

03-23-2009, 12:20 PM
Hey everyone,

I recently added a form to my contacts page which just fires off an email when submitted. All is good except that date and time are set to EST. I didn't code this particular part myself so Im not sure how to change it to Australian eastern standard or daylight time (AEST/AEDT).

Here's the particular code

$todayis = date("l, F j, Y, g:i a") ;

Any help appreciated.


03-23-2009, 01:45 PM
whats the format your trying to produce

03-23-2009, 10:31 PM
Hi mate, this is how its appearing in the email

Monday, March 23, 2009, 3:13 am [EST]

03-24-2009, 01:02 AM
I figured it out. For anyone else whoever comes across this problem you need to make sure firstly that this line of code exists;


You also need to insert an 'e' for the time zone to make it;

$todayis = date("l, F j, Y, g:i a, e") ;

obviously replace the 'Australia/NSW' with your required timezone which can be found from here


The result looks like this;

Tuesday, March 24, 2009, 11:47 am, Australia/NSW

If anyone new to php like me the date and time info can be found here;