Merge pull request #533 from owncloud/milliseconds
WebODF uses timestamps with milliseconds
This commit is contained in:
commit
a7da2844f9
@ -90,7 +90,7 @@ class Op extends \OCA\Documents\Db {
|
||||
$op = array(
|
||||
'optype' => 'AddMember',
|
||||
'memberid' => (string) $memberId,
|
||||
'timestamp' => (string) time(),
|
||||
'timestamp' => $this->getMillisecondsAsString(),
|
||||
'setProperties' => array(
|
||||
'fullName' => $fullName,
|
||||
'color' => $color,
|
||||
@ -106,7 +106,7 @@ class Op extends \OCA\Documents\Db {
|
||||
'optype' => 'RemoveCursor',
|
||||
'memberid' => (string) $memberId,
|
||||
'reason' => 'server-idle',
|
||||
'timestamp' => (string) time()
|
||||
'timestamp' => $this->getMillisecondsAsString()
|
||||
);
|
||||
$this->insertOp($esId, $memberId, $op);
|
||||
}
|
||||
@ -115,7 +115,7 @@ class Op extends \OCA\Documents\Db {
|
||||
$op = array(
|
||||
'optype' => 'RemoveMember',
|
||||
'memberid' => (string) $memberId,
|
||||
'timestamp' => (string) time()
|
||||
'timestamp' => $this->getMillisecondsAsString()
|
||||
);
|
||||
$this->insertOp($esId, $memberId, $op);
|
||||
}
|
||||
@ -125,7 +125,7 @@ class Op extends \OCA\Documents\Db {
|
||||
$op = array(
|
||||
'optype' => 'UpdateMember',
|
||||
'memberid' => (string) $memberId,
|
||||
'timestamp' => (string) time(),
|
||||
'timestamp' => $this->getMillisecondsAsString(),
|
||||
'setProperties' => array(
|
||||
'fullName' => $fullName,
|
||||
)
|
||||
@ -184,4 +184,11 @@ class Op extends \OCA\Documents\Db {
|
||||
}
|
||||
return $ops;
|
||||
}
|
||||
|
||||
protected function getMillisecondsAsString(){
|
||||
$microtime = microtime();
|
||||
list($usec, $sec) = explode(" ", $microtime);
|
||||
$milliseconds = $sec.substr($usec, 2, 3);
|
||||
return $milliseconds;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user