pub fn current_time_us(&self) -> u64 {
        // Current time is boot time + time since boot

        let rtc_time_us = self.time_since_boot().as_micros();
        let boot_time_us = self.boot_time_us();
        let wrapped_boot_time_us = u64::MAX - boot_time_us;

        // We can detect if we wrapped the boot time by checking if rtc time is greater
        // than the amount of time we would've wrapped.
        if rtc_time_us > wrapped_boot_time_us {
            // We also just checked that this won't overflow
            rtc_time_us - wrapped_boot_time_us
        } else {
            boot_time_us + rtc_time_us
        }
    }
# use esp_hal::rtc_cntl::Rtc;
use jiff::{Timestamp, tz::{self, TimeZone}};

static TZ: TimeZone = tz::get!("America/New_York");

let rtc = Rtc::new(peripherals.LPWR);
let now = Timestamp::from_microsecond(
rtc.current_time_us() as i64,
)?;
let weekday_in_new_york = now.to_zoned(TZ.clone()).weekday();
# Ok(())
# }
```
esp-hal/src/rtc_cntl/mod.rs