Receiving current local time

This commit is contained in:
Alexey 2025-09-08 14:07:18 +03:00
commit 599b027d19
6 changed files with 94 additions and 30 deletions

View file

@ -3,11 +3,17 @@
use std::error::Error;
use chrono::Timelike;
slint::include_modules!();
fn main() -> Result<(), Box<dyn Error>> {
let ui = AppWindow::new()?;
let now = chrono::Local::now();
let offset = now.hour() * 3600 + now.minute() * 60 + now.second();
ui.invoke_update_record_offset(offset as i32);
ui.run()?;
Ok(())