Page 1 of 1

php date

Posted: Thu Oct 06, 2011 5:34 am
by YoussefSiblini
Hi,
Is there a way to achieve this date below using php, I achieved this using this javascript code: new Date().valueOf(); but I need it in php;

Code: Select all

Required. Date and time of the 
purchase expressed as the number 
of milliseconds elapsed since
January 1, 1970 00:00:00 GMT.
For example, the TimeStamp for
00:00:00 GMT, 1st September
2003 is 1062374400000
.
Youssef

Re: php date

Posted: Thu Oct 06, 2011 5:59 am
by Celauran
Have you looked at microtime()?

Re: php date

Posted: Thu Oct 06, 2011 6:14 am
by YoussefSiblini
Thank you Celauran,
Can I achieve some thing like I mentioned above and here is more desc: TimeStamp – The window of opportunity for a valid TimeStamp is +/-1 hour from the based on the actual GMT time of submitting the Merchant POST.

?

Sorry I am still a newb with php.

Youssef

Re: php date

Posted: Thu Oct 06, 2011 6:17 am
by Celauran
microtime gives you seconds + microseconds. I'd concatenate the two and drop unneeded significant digits.