From b3c82eee87db457af39e3c18e006b02fd761e26d Mon Sep 17 00:00:00 2001 From: Simon Josefsson Date: Tue, 10 Mar 2009 19:01:07 +0000 Subject: [PATCH] Make getUTCTimeStamp return milliseconds too, similar to Java server. --- common.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/common.php b/common.php index 6abaa2f..1da9ad7 100644 --- a/common.php +++ b/common.php @@ -38,11 +38,12 @@ function genRandRaw($len) { return $s; } -// Return eg. 2008-11-21T06:11:55 +// Return eg. 2008-11-21T06:11:55Z0711 // function getUTCTimeStamp() { date_default_timezone_set('UTC'); - return date('Y-m-d\TH:i:s', time()); + $tiny = substr(microtime(false), 2, 3); + return date('Y-m-d\TH:i:s\Z0', time()) . $tiny; } // Sign a http query string in the array of key-value pairs