I have updated the PHP rpms to 5.4.3. Click here to download the rpms.
PHP 5.4.3 for Linux Centos 6.2
Reply
I have updated the PHP rpms to 5.4.3. Click here to download the rpms.
I have updated the PHP rpms to 5.4.2. Click here to download the rpms.
date_default_timezone_set("UTC");
function internetMicrotime($get_as_float = false)
{
//Calculate Swatch internet time
//Get unix timestamp for the beginning of the this day
//With 1 hour offset for the Swatch internet timezone
//(Biel Meantime (BMT): UTC+1 without DST)
$beginningOfDay = mktime(-1, 0, 0);
//Calulate total SI seconds in a day
$totalSIsecondsInDay = 60 * 60 * 24;
//Define how many beats there are in a day
$totalBeatsInDay = 1000;
//SI seconds elapsed since the beginning of the day
$secondsElapsed = microtime(true) - $beginningOfDay;
//Calculate factor on how far this day has elapsed
$factor = $secondsElapsed / $totalSIsecondsInDay;
//Now calulate the decimal time using
//the total decimal seconds and the factor
$internetTime = $totalBeatsInDay * $factor;
if ($get_as_float)
return $internetTime;
else
return floor($internetTime);
}
print internetMicrotime(true)."\n"; //495.81894635326
print internetMicrotime(false)."\n"; //495
print date("H:i:s")."\n"; //10:53:58
Further reading: http://www.swatch.com/zz_en/internettime/
date_default_timezone_set("Europe/Amsterdam");
function hexadecimalTime()
{
//Calculate hexadecimal local time
//Get unix timestamp for the beginning of this day
$beginningOfDay = mktime(0, 0, 0);
//Calculate total SI seconds in a day
$totalSIsecondsInDay = 60 * 60 * 24;
//Define how many hexadecimal seconds there are in a day
$totalHexadecimalSecondsInDay = 0xFFFF;
//SI seconds elapsed since the beginning of the day
$secondsElapsed = microtime(true) - $beginningOfDay;
//Calculate factor on how far this day has elapsed
$factor = $secondsElapsed / $totalSIsecondsInDay;
//Now calculate the hexadecimal time using
//the total hexadecimal seconds and the factor
$hexadecimalTime = $totalHexadecimalSecondsInDay * $factor;
return dechex(floor($hexadecimalTime));
}
print hexadecimalTime()."\n"; //85fc
print date("H:i:s")."\n"; //12:33:41
date_default_timezone_set("Europe/Amsterdam");
function decimalMicrotime($get_as_float = false)
{
//Calculate decimal local microtime
//Get unix timestamp for the beginning of this day
$beginningOfDay = mktime(0, 0, 0);
//Calculate total SI seconds in a day
$totalSIsecondsInDay = 60 * 60 * 24;
//Define how many decimal seconds there are in a day
$totalDecimalSecondsInDay = 100000;
//SI seconds elapsed since the beginning of the day
$secondsElapsed = microtime(true) - $beginningOfDay;
//Calculate factor on how far this day has elapsed
$factor = $secondsElapsed / $totalSIsecondsInDay;
//Now calculate the decimal time using
//the total decimal seconds and the factor
$decimalTime = $totalDecimalSecondsInDay * $factor;
if ($get_as_float)
return $decimalTime;
else
return floor($decimalTime);
}
print decimalMicrotime(true); //89580.109306784
print decimalMicrotime(false); //89580
print date("H:i:s"); //21:29:57
I have updated the PHP rpms to 5.4.1. Click here to download the rpms.
I have updated the PHP rpms to 5.4.0. Click here to download the rpms.
Release notes: http://www.php.net/archive/2012.php#id2012-03-01-1
The key features of PHP 5.4.0 include:
I have updated the PHP rpms to 5.3.10. Click here to download the rpms.
Release notes: http://www.php.net/archive/2012.php#id2012-02-02-1
Security Fixes in PHP 5.3.10:
All users are strongly encouraged to upgrade to PHP 5.3.10.
I have updated the PHP rpms to 5.3.9. Click here to download the rpms.
I have updated the PHP rpms to 5.2.17. Click here to download the rpms.