Skip to content

Commit

Permalink
remove minute/second time offset
Browse files Browse the repository at this point in the history
  • Loading branch information
haxjump committed Nov 1, 2024
1 parent d9c9bb0 commit 43b9534
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ruc"
version = "7.8.2"
version = "7.8.3"
authors = ["[email protected]"]
edition = "2021"
description = "Rust Util Collections"
Expand Down
2 changes: 1 addition & 1 deletion src/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ macro_rules! ts {
/// generate a 'formated DateTime'
#[inline(always)]
pub fn gen_datetime(ts: i64) -> String {
let format = time::format_description::parse("[year]-[month]-[day] [hour]:[minute]:[second] [offset_hour sign:mandatory]:[offset_minute]:[offset_second]").unwrap();
let format = time::format_description::parse("[year]-[month]-[day] [hour]:[minute]:[second] [offset_hour sign:mandatory]").unwrap();
time::OffsetDateTime::from_unix_timestamp(ts)
.unwrap()
.to_offset(time::UtcOffset::from_hms(8, 0, 0).unwrap())
Expand Down

0 comments on commit 43b9534

Please sign in to comment.