timezone and credits
This commit is contained in:
@@ -1,3 +1,5 @@
|
|||||||
|
// gracefully stolen from https://github.com/gwilymk/arduino-joystick/tree/master/joystick-daemon/src/joystick <3
|
||||||
|
|
||||||
mod axis;
|
mod axis;
|
||||||
mod button;
|
mod button;
|
||||||
mod error;
|
mod error;
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ use embedded_graphics::{
|
|||||||
prelude::*,
|
prelude::*,
|
||||||
text::{Alignment, Text, TextStyleBuilder},
|
text::{Alignment, Text, TextStyleBuilder},
|
||||||
};
|
};
|
||||||
use time::OffsetDateTime;
|
use time::{OffsetDateTime, macros::offset};
|
||||||
|
|
||||||
use crate::g13::{G13, G13_LCD_COLUMNS, G13_LCD_ROWS};
|
use crate::g13::{G13, G13_LCD_COLUMNS, G13_LCD_ROWS};
|
||||||
|
|
||||||
@@ -27,7 +27,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|||||||
.build();
|
.build();
|
||||||
|
|
||||||
loop {
|
loop {
|
||||||
let now = OffsetDateTime::now_utc();
|
let now = OffsetDateTime::now_utc().to_offset(offset!(+1));
|
||||||
|
|
||||||
let string = format!("{:0>2}:{:0>2}:{:0>2}", now.hour(), now.minute(), now.second());
|
let string = format!("{:0>2}:{:0>2}:{:0>2}", now.hour(), now.minute(), now.second());
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user