Releases: cmfcmf/OpenWeatherMap-PHP-API
Fix timezone related issues
This release corrects the use of timezones throughout the project. OpenWeatherMap returns dates in the UTC timezone. However, up until now, not all \DateTime
instances returned by this API were using UTC as their timezone. This resulted in the problems described in #119, which were fixed in #120.
Thank you @Clpsplug for finding and reporting the issue as well as verifying the fix!
I really hope timezone handling is working as intended now. But timezone related code always seems prone to issues, so please open an issue if you encounter any problems with this release!
If you like my work, I'd really appreciate you buying me a coffee. Your donations help me put more time into Open-Source software development.
Correct imperial windspeed unit in forecasts
Get current weather by zipcode
You can now retrieve the current weather using a zipcode (see here for official OWM documentation).
// Get current temperature from zip code (Hyderabad, India).
$weather = $owm->getWeather('zip:500001,IN', $units, $lang);
echo 'City: '.$weather->city->name;
echo 'Temperature: '.$weather->temperature;
Wind direction optional
The wind direction is now optional (#101).
UV Index API support
- uv index api support
- no more http for icon urls
- tests
Multiple cities with query endpoint added
Timezone related issues fixed
v2.1.1 Fix multiple timezone related errors, closes #73. (#75)
Better API key support, fixed critical error in temperature calculation
- added automated integration tests (thanks @aseriy!)
- fixed rounding errors in average temperature calculation for forecasts
- use PSR-4 instead of PSR-0 autoloading
- re-arranged OpenWeatherMap constructor arguments while keeping backwards compatibility (you should now pass the api key as first constructor argument)
Fixed wind direction in forecasts
Also doesn't require-dev phpunit anymore.