Hello Oleg,
Thanks again.Right now I have time to look at the new “u” option added in 5.2.2
This tiime I think you have misunderstud the “u” option.
With few words the u option is equal to getMilliseconds javascript function and it can not be used separatley.
In order proff my concept I have creatted simple test in PHP:
echo date(“U”);
echo date(“u”);
The second echo return in my demo “000000”. I asked myself why?
My investigations go to the following equvalent of date(“u”) = > microtime()
(note that at PHP site you have point for the date function we have a note:
Note:
Since this function only accepts integer timestamps the u format character is only useful when using the date_format() function with user based timestamps created with date_create().
)
Having this I have two numbers from the following expressins:
echo date(“U”); ====>1330249977
echo microtime( true); ====>1330249977.874
Now I pass the numbers to the following expression
var timestamp1 = new Date (1330249977);
var timestamp2 = new Date (1330249977.877);
Both of these return
Date {Fri Jan 16 1970 11:30:49 GMT+0200 (FLE Standard Time)}
Now doing
var timestamp1 = new Date ( parseFloat(1330249977)*100);
var timestamp2 = new Date ( parseFloat(1330249977.877) *1000);
both of these return
Date {Sun Feb 26 2012 11:52:57 GMT+0200 (FLE Standard Time)}
With simple words I think