plugins/yubikey/corelib.php
changeset 22 9b8688df52d5
parent 21 f34ecfa459ab
child 27 647f0aa485dd
equal deleted inserted replaced
21:f34ecfa459ab 22:9b8688df52d5
   216   return false;
   216   return false;
   217 }
   217 }
   218 
   218 
   219 function yk_strtotime($timestamp)
   219 function yk_strtotime($timestamp)
   220 {
   220 {
   221   if ( !preg_match('/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})(?:Z[0-9]+)$/', $timestamp, $match) )
   221   if ( !preg_match('/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})(?:Z[0-9]+)?$/', $timestamp, $match) )
   222     return 0;
   222     return 0;
   223   
   223   
   224   $hour = intval($match[4]);
   224   $hour = intval($match[4]);
   225   $minute = intval($match[5]);
   225   $minute = intval($match[5]);
   226   $second = intval($match[6]);
   226   $second = intval($match[6]);