Round a Windows timestamp down to seconds and remove
the seconds between 1601-01-01 and 1970-01-01.
public static convertWindowsTimeToUnixTime ( float $windowsTime ) : float | ||
$windowsTime | float | |
Результат | float |
/** * Return the expiration date of the user account. * * @return DateTime|null */ public function expirationDate() { $accountExpiry = $this->getAccountExpiry(); if ($accountExpiry == 0 || $accountExpiry == $this->getSchema()->neverExpiresDate()) { return; } $unixTime = Utilities::convertWindowsTimeToUnixTime($accountExpiry); return new DateTime(date($this->dateFormat, $unixTime)); }