Reputation: 1
i use the Predicate Editor to make Filter and save results to mysql. Dates will be saved (Today) as: 316077618.500794
My Question: How can i calculate this in a PHP Time? I want to echo out this date as a Realdate but i find no way how to calc this for php.
I cant modify in cocoa code, it must be format out in PHP.
I need help :)
Thank you very much.
Upvotes: 0
Views: 591
Reputation: 1116
NSDate Reference Tells me :
The sole primitive method of NSDate, timeIntervalSinceReferenceDate, provides the basis for all the other methods in the NSDate interface. This method returns a time value relative to an absolute reference date—the first instant of 1 January 2001, GMT.
You have 2 options:
Upvotes: 2
Reputation: 1
oh thank you :) The Soulution is:
$NSDATE='-61737774.586439';
$d=mktime(0, 0, 0, 1, 1, 2001)+ ($NSDATE) ;
echo date("d.m.Y",$d);
:D
Hope helps :)
Upvotes: 0