On Wed, March 26, 2008 12:50 pm, Dee Ayy wrote: > 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? Because too many sysadmins were NOT updating their time zone database with package/software updates as they should, the PHP Dev Team got tired of bug reports et al about messed up dates, and they now include a CURRENT copy of the timezone database built-in to PHP. This, of course, violates the principle of having the source in one place... But it saves them a lot of headaches. So PHP "knows" about the recent date-change of when daylight savings kicks in, but since your sysadmin didn't update the time zone db on the "web server" the OS does *not* know the correct time. Daylight Savings Time must die! Really, there cannot be any real "savings" here... The time wasted by humanity to reset clocks and fix all the buglets from this stupid clock-changing game MUST outweight any debatable "benefits" -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php