Re: @imap_headerinfo->date

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, May 29, 2007 1:12 pm, Umar wrote:
> Dear Members!
>
>   When I try to get email date through @imap_headerinfo the output
> like this
>
>         Wed, 30 May 2007 01:14:03 +0900
>  	Tue, 29 May 2007 22:31:43 +0500
>
>   But i want to change it e.g on current date it should be only time
> 01:14
> PM
>   and on previous day its should be (May 29) how i can do it plz help.

I'm not quite sure what imap_headerinfo is returning, but I have found
that it's best to take the date/time of the various Received: headers,
and then calculate if any of them are "way" different from the others,
and throw out any oddballs, and then strtotime() on the rest, and
average that...

There are just too many servers with clocks that are "off" to rely on
a single time-stamp.

You can play whatever games you want with strtotime/date and mktime to
calculate whatever you think is the "right" date/time from whatever
input you consider relevant.

And the "Date:" header from a user's PC is pretty much worthless, all
too often, as their date/time is set wrong, or their CMOS battery died
and it returns 1/1/1970 12:00:00 or...

-- 
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/browse/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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux