You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I have a use case where I know my longitude and latitude but not the timezone (using IP to get my current approx lat and long). I want to then use this package to calculate the sunrise and sunset times for my location. However, I am unsure what I should set the timezone to in the argument when instantiating LocationInfo. I can use the dateutil module to ensure when I instantiate sun on the LocationInfo I pass it tz.tzlocal() to its tzinfo argument, but I don't understand what the timezone set prior to this will do? E.g. say I instantiate a lat and long roughly on the west coast of the US:
city=LocationInfo(latitude=34, longitude=-118)
The timezone will default to Europe/London. If I then do:
Assuming I am actually at that lat/long, the times returned seem correct, even though the timezone on the city is incorrect? Hope my question makes sense.
The text was updated successfully, but these errors were encountered:
Hi, I have a use case where I know my longitude and latitude but not the timezone (using IP to get my current approx lat and long). I want to then use this package to calculate the sunrise and sunset times for my location. However, I am unsure what I should set the timezone to in the argument when instantiating
LocationInfo
. I can use thedateutil
module to ensure when I instantiatesun
on theLocationInfo
I pass ittz.tzlocal()
to itstzinfo
argument, but I don't understand what the timezone set prior to this will do? E.g. say I instantiate a lat and long roughly on the west coast of the US:The timezone will default to
Europe/London
. If I then do:Assuming I am actually at that lat/long, the times returned seem correct, even though the timezone on the
city
is incorrect? Hope my question makes sense.The text was updated successfully, but these errors were encountered: