Which method to use in php to generate firebase timestamp, which is equally to firebase.serverValue.timestamp?
I have tried using
public static final Map TIMESTAMP
A placeholder value for auto-populating the current timestamp (time since the Unix epoch, in milliseconds) by the Firebase Database servers. Doc Link
As it reads in the documentation it's in millis. The actual definition of timestamp is in seconds but, anyway to get the actual timestamp in millis in PHP you have to
Edit: to get millis from microseconds (returned by microtime()) you have to:
$timeparts = explode(" ",microtime()); $currenttime = bcadd(($timeparts*1000),bcmul($timeparts,1000)); echo $currenttime;