Erik
Erik

Reputation: 5791

Time Stamp off/ahead 1 hour in php script

I have a time stamp in my form results script, but the time stamp is ahead 1 hour. Can anyone tell how to adjust the time stamp to be accurate? or is this just on my pc?

Here is my current code:

$Body .= date("Y-m-d H:i A e");

Upvotes: 0

Views: 572

Answers (2)

mcbeav
mcbeav

Reputation: 12275

You can set the timezone if you have access to the .htaccess file

SetEnv TZ "location"

location is the timezone you want to set.

Upvotes: 1

Alan Geleynse
Alan Geleynse

Reputation: 25139

You might want to check the timezone on your server. Most likely, the timezone is set 1 hour differently there than you are expecting.

Upvotes: 0

Related Questions