';
//convert from Unix time to eastern time zone
$dt = new DateTime();
$dt->setTimeStamp($entries->time);
$dt->setTimeZone(new DateTimeZone('America/New_York'));
echo '
'.$dt->format('F j, Y, g:i a').'
';
//echo ' ';
//how old is this data?
$diff = new DateTime();
$first = new DateTime();
$second = new DateTime();
$first->setTimeStamp($entries->time);
$second->setTimeStamp(time());
$diff = $first->diff($second);
echo 'Retrieved '.$diff->format ('%i').' minute(s) ago';
echo '
';
//convert from Celsius to Fahrenheit
$conv_temp = (($entries->temp*9)/5)+32+15;
echo 'Temperature '.round($conv_temp, 0).' ËšF ';
//convert pressure from mbar to inHg
$conv_press = (($entries->pressure)/33.864);
echo 'Barometric Pressure '.number_format($conv_press, 2).' inHg ';
//echo 'Humidity '.$entries->humidity.' % ';
//convert wind speed from m/s to mph
$conv_wspeed = (($entries->wind_speed)*2.237);
echo 'Wind Speed '.round($conv_wspeed).' mph ';
//convert wind gust from m/s to mph
$conv_wgust = (($entries->wind_gust)*2.237);
echo 'Wind Gust '.round($conv_wgust).' mph ';
echo 'Wind Direction '.$entries->wind_direction.'Ëš ';
$conv_rain = (($entries->rain_mn)/25.4);
echo ''.number_format($conv_rain, 2).' inches of rain since Midnight ';
echo ' ';
?>
Aeromura is a Mobile Weather App
just for RC Pilots around the world Check it out by Clicking on the linked Pictures below Download it FREE for 10+ days
If you like it, pay only $15.00 a year
The App is for ​iPhone and Android