convertUnixTimeToWindowsTime() public static method

Convert a Unix timestamp to Windows timestamp.
public static convertUnixTimeToWindowsTime ( float $unixTime ) : float
$unixTime float
return float
Example #1
0
 /**
  * Sets the users account expiry date.
  *
  * https://msdn.microsoft.com/en-us/library/ms675098(v=vs.85).aspx
  *
  * @param float $expiryTime
  *
  * @return User
  */
 public function setAccountExpiry($expiryTime)
 {
     $time = is_null($expiryTime) ? '9223372036854775807' : (string) Utilities::convertUnixTimeToWindowsTime($expiryTime);
     return $this->setAttribute($this->schema->accountExpires(), $time, 0);
 }
Example #2
0
 /**
  * Sets the users account expiry date.
  *
  * https://msdn.microsoft.com/en-us/library/ms675098(v=vs.85).aspx
  *
  * @param float $expiryTime
  *
  * @return User
  */
 public function setAccountExpiry($expiryTime)
 {
     $time = is_null($expiryTime) ? '9223372036854775807' : (string) Utilities::convertUnixTimeToWindowsTime($expiryTime);
     return $this->setAttribute(ActiveDirectory::ACCOUNT_EXPIRES, $time, 0);
 }