Today, we are in Central Daylight Time "CDT" in Dallas, Texas, USA -- yes?

"date" on:
mail server: Wed Mar 26 11:45:00 CDT 2008 (CORRECT)
web server: Wed Mar 26 11:45:00 CST 2008
Note CDT versus CST.

"date -u"
mail server: Wed Mar 26 16:45:00 UTC 2008 (CORRECT at 11:45 AM local
time [Central Daylight Time (CDT) is UTC minus 5 hours])
web server: Wed Mar 26 17:45:00 UTC 2008

>From a test CLI script and from the web page test script on the web server,
echo date("Y-m-d H:i:s");
returns "2008-03-26 11:45:00".

An application PHP script ran on the web server, uses date("Y-m-d
H:i:s") to generate a timestamp to put in the body of an email sent
with PHP mail().
I think the mail() command on the web server forwards to the actual
mail server (but I am not sure -- how do I verify this?).

An example email (only after we switched to daylight savings time on
3/10 and I'm sure our admin had to manually update the clock) shows
the email header as Mon, 10 Mar 2008 14:35:44 -0500
and in the email client without looking at raw source as Date: March
10, 2008 2:35:44 PM CDT, but the body of the email (which used PHP
date("Y-m-d H:i:s")) shows 2008-03-10 13:35:44.
Note 13 instead of 14.

I've asked the admin to make sure the web server reports CDT (I'm
still waiting), but it seems strange that date("Y-m-d H:i:s") from the
test scripts already shows the correct info before this change.

Any thoughts?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to