Skip to content

Commit 63519f5

Browse files
committed
Add a timestamp option using a static UTC offset
Closes #50
1 parent 36f984e commit 63519f5

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

examples/timestamps_utc_offset.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
use simple_logger::SimpleLogger;
2+
use time::UtcOffset;
3+
4+
fn main() {
5+
SimpleLogger::new()
6+
.with_utc_offset(UtcOffset::from_hms(14, 0, 0).unwrap())
7+
.init()
8+
.unwrap();
9+
10+
log::warn!("This is an example message using a static UTC offset.");
11+
log::info!("Daylight savings or other timezone changes will not be respected.");
12+
}

0 commit comments

Comments
 (0)