timestamps_utc_offset.rs 352 B

123456789101112
  1. use simple_logger::SimpleLogger;
  2. use time::UtcOffset;
  3. fn main() {
  4. SimpleLogger::new()
  5. .with_utc_offset(UtcOffset::from_hms(14, 0, 0).unwrap())
  6. .init()
  7. .unwrap();
  8. log::warn!("This is an example message using a static UTC offset.");
  9. log::info!("Daylight savings or other timezone changes will not be respected.");
  10. }