-
Notifications
You must be signed in to change notification settings - Fork 475
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
extend weather block to show sunset and sunrise #2028
Conversation
I did a little POC to get the date based on the lat/long so that we can pass that to metno. Add use chrono::Utc;
use chrono_tz::Tz;
fn main() {
let (lat, long) = (30., -97.);
let tz: Tz = tz_search::lookup(lat, long).unwrap().parse().unwrap();
let date = Utc::now().with_timezone(&tz).format("%Y-%m-%d");
println!("{}", date);
} Obviously we'd want to swap out those |
@sMailund would you like to continue work on this? If not I can take it over. |
@bim9262 been meaning to get back to this for a while, but not able to get the time for it! Feel free to take over if you want to! |
82075f0
to
319c523
Compare
@sMailund, I squashed your commits, and rebased them onto master + added one new commit to add the sunset to the nws provider + rearrange a bit for the rebase. Feel free to check it out/test |
ref #715
Opted to include into existing weather block instead of creating standalone block.
Implemented for both OpenWeatherMap and MetNo providers