definitely thanks again, and sorry for the brain fart moment :)

 ~Rob

 


 

-----Original Message-----
From: Donald J. Organ IV <dor...@donaldorgan.com>
To: NYPHP Talk <talk@lists.nyphp.org>
Sent: Mon, Mar 14, 2011 1:35 pm
Subject: Re: [nyphp-talk] Date conversion from Java timestamp to PHP date


Another note I believe epoch time is always GMT based so you may need to 
convert this to your current Time Zone.





From: "Donald J. Organ IV" <dor...@donaldorgan.com>
To: "NYPHP Talk" <talk@lists.nyphp.org>
Sent: Monday, March 14, 2011 1:34:34 PM
Subject: Re: [nyphp-talk] Date conversion from Java timestamp to PHP date


I believe java is epoch time and is returned in milliseconds....
so just take that value and divide it by 1000 then use that in your date 
function






$seconds = $java_time / 1000;


$date = date('Y-m-d H:i:s', $seconds );





From: "Rob" <y2...@aol.com>
To: talk@lists.nyphp.org
Sent: Monday, March 14, 2011 1:23:48 PM
Subject: [nyphp-talk] Date conversion from Java timestamp to PHP date


 

 Hello,
I was wondering if anyone has a way to convert a Java timestamp into a proper 
PHP date format.  I am plugging into an API, and what i thought was a Unix 
timestamp appears to be a Java timestamp, which there is a difference in the 
conversion.  All posts I've read so far says, there a difference with 
milliseconds, but I was wondering if anyone else has found a solution to this.

Forums say to plug the timestamp into the normal PHP date() function, but 
though I get a proper month and day, the year is really obviously wrong.

Thanks in advance,
~Rob



_______________________________________________
New York PHP Users Group Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

http://www.nyphp.org/Show-Participation

_______________________________________________
New York PHP Users Group Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

http://www.nyphp.org/Show-Participation

 
_______________________________________________

New York PHP Users Group Community Talk Mailing List

http://lists.nyphp.org/mailman/listinfo/talk



http://www.nyphp.org/Show-Participation


 
_______________________________________________
New York PHP Users Group Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

http://www.nyphp.org/Show-Participation

Reply via email to