You've already forked AstralRinth
forked from didirus/AstralRinth
move to monorepo dir
This commit is contained in:
9
apps/labrinth/src/util/date.rs
Normal file
9
apps/labrinth/src/util/date.rs
Normal file
@@ -0,0 +1,9 @@
|
||||
use chrono::Utc;
|
||||
|
||||
// this converts timestamps to the timestamp format clickhouse requires/uses
|
||||
pub fn get_current_tenths_of_ms() -> i64 {
|
||||
Utc::now()
|
||||
.timestamp_nanos_opt()
|
||||
.expect("value can not be represented in a timestamp with nanosecond precision.")
|
||||
/ 100_000
|
||||
}
|
||||
Reference in New Issue
Block a user