Comments (5)
Hi @dragethy,
I think I fixed all timezone related errors in #75. Let me know if it works for you 💯
from openweathermap-php-api.
Your Solution works
This is your Output: 04:32 (UTC)
a better solution is to calculate the Time for the right Timezone for the place
my verry hardcoded Solution ist for Germany
$date_sunset = $forecast->sun->set ;
$date_sunset->modify( '+2 hours' );
$date_sunrise = $forecast->sun->rise;
$date_sunrise->modify('+2 hours');
from openweathermap-php-api.
You should rather do
$forecast->sun->set->setTimezone(new \DateTimezone('Europe/Berlin'))->format('d.m.Y H:i (e)')
from openweathermap-php-api.
Great works like a charm
from openweathermap-php-api.
Great works like a charm
Ok, great! Released version 2.1.1.
from openweathermap-php-api.
Related Issues (20)
- Zip Code? HOT 4
- Dealing with Internal error: 500001
- getRawWeatherGroupData() HOT 3
- OpenWeatherMap Class Not Found Error (NOT Installed through Composer) HOT 3
- GuzzleAdapter and Requestfactory excessive HOT 1
- getValue() error HOT 7
- $owm->getDailyWeatherForecast() HOT 6
- OWMNotFoundException never thrown
- Please add getForecast() method on WeatherForecast HOT 2
- Missing dependency psr/http-factory
- Move to Travis CI dot com or another CI service
- Add historic weather data HOT 1
- No method for One Call API HOT 4
- update to psr/cache to 3.0 ? HOT 1
- Return type of Cmfcmf\OpenWeatherMap\Util\Unit::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used HOT 1
- "Docusaurus" is spelled wrong in README.md HOT 1
- Replace UV Index API with One Call API
- typo HOT 1
- Convert Hourly Forecast into Daily Forecast
- Migrate to /guzzle7-adapter HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openweathermap-php-api.