File: timestamps_utc_offset.rs

package info (click to toggle)
rust-simple-logger 5.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 220 kB
  • sloc: makefile: 4
file content (12 lines) | stat: -rw-r--r-- 352 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
use simple_logger::SimpleLogger;
use time::UtcOffset;

fn main() {
    SimpleLogger::new()
        .with_utc_offset(UtcOffset::from_hms(14, 0, 0).unwrap())
        .init()
        .unwrap();

    log::warn!("This is an example message using a static UTC offset.");
    log::info!("Daylight savings or other timezone changes will not be respected.");
}