Jump to content

Archived

This topic is now archived and is closed to further replies.

ben14

PHP Mail date wrong

Recommended Posts

Ok, when i send any emails from php the date that comes through on the email is the 01/01/1970. This only seems to happen in window mail clients, but on macs, gmail the date is correct.

Wondering if anyone knows what could be the problem and what the fix is?

Share this post


Link to post
Share on other sites
Well there are several factors here.

1.) Look at the header of a received piece of mail, make sure the header date/time is really wrong, or is it the email client interpreting wrong? Probably wrong in the header but worth a look

2.) Depending on your version of PHP (5.0.5+ I think) in the PHP.ini you can set your default timezone and php bases all date functions off of the timezone, this is worth checking into as well (default.timezone = US/Eastern .... etc).

3.) It's funny that you mention January 1, 1970 as that is the date of the UNIX Epoch to which all UNIX timestamps start counting seconds from. Are you sure your not stamping the email your sending (using mktime() perhaps?) and maybe not doing a proper calculation of some sort?

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.