1
0
mirror of https://github.com/Yubico/yubikey-val.git synced 2024-11-29 09:24:12 +01:00

Make getUTCTimeStamp return milliseconds too, similar to Java server.

This commit is contained in:
Simon Josefsson 2009-03-10 19:01:07 +00:00
parent a066f40896
commit b3c82eee87

View File

@ -38,11 +38,12 @@ function genRandRaw($len) {
return $s; return $s;
} }
// Return eg. 2008-11-21T06:11:55 // Return eg. 2008-11-21T06:11:55Z0711
// //
function getUTCTimeStamp() { function getUTCTimeStamp() {
date_default_timezone_set('UTC'); 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 // Sign a http query string in the array of key-value pairs