Go Back   Forum Care Forums > Development Reference Area > Php Development

Reply
 
LinkBack Thread Tools Display Modes
@imap_headerinfo->date
Old
  (#1)
Umar
Guest
 
Posts: n/a
Default @imap_headerinfo->date - 06-02-2007, 08:55 PM


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.

Regards,

Umar Draz
--
View this message in context: http://www.nabble.com/%40imap_header...html#a10859574
Sent from the PHP - General mailing list archive at Nabble.com.
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Re: [PHP] @imap_headerinfo->date
Old
  (#2)
Richard Lynch
Guest
 
Posts: n/a
Default Re: [PHP] @imap_headerinfo->date - 06-02-2007, 08:56 PM

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?
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





Contact Us - Forum Care Forums - Archive - Top