Welcome Guest, Not a member yet? Register   Sign In
Format of time?
#1

I have a table made from submissions from a Wordpress plugin which includes a time stamp in the form of 1412801267.7476

Can anyone tell me what format of time stamp this is? it doesnt look like its time() or microtime() to me unless it has some attributes applied. Thanks for your help!
Reply
#2

Probably microtime(). I dumped the value into a Unix timestamp converter and got:
1412801267.7476
Is equivalent to:
10/08/2014 @ 8:47pm (UTC)
2014-10-08T20:47:47+00:00 in ISO 8601
Reply
#3

microtime() gives me a strange output like this 0.86780600 1422565150
microtime(true) is a little closer which gives 1422566881.35
and time() just gives 1422564812

seems like its some accuracy of microtime
Reply
#4

per the PHP manual, microtime() returns "msec sec" where sec is the number of seconds and msec is the number of microseconds, in seconds. microtime(true) returns the value as a float.

So, if microtime() outputs "0.86780600 1422565150", the same value would be output by microtime(true) as 1422565150.8678

I'm sure there are any number of settings to configure the precision of the output, but what I see locally when calling microtime(true) is something like 1422997756.6868
Reply




Theme © iAndrew 2016 - Forum software by © MyBB