parser: fix binance time

This commit is contained in:
k
2024-08-05 11:23:41 +02:00
parent 992d45c8af
commit 9a8f5edd58
2 changed files with 5 additions and 5 deletions
+3 -4
View File
@@ -122,7 +122,7 @@ impl Binance {
// [timestamp, open, high, low, close, volume, ...]
let array = value.as_array().unwrap();
let timestamp = array.first().unwrap().as_u64().unwrap() as u32;
let timestamp = (array.first().unwrap().as_u64().unwrap() / 1000) as u32;
let get_f32 = |index: usize| {
array
@@ -169,9 +169,8 @@ impl Binance {
// [timestamp, open, high, low, close, volume, ...]
let array = value.as_array().unwrap();
let date = Date::from_timestamp(
array.first().unwrap().as_u64().unwrap() as u32 / 1000,
);
let date =
Date::from_timestamp(array.first().unwrap().as_u64().unwrap() as u32);
let get_f32 = |index: usize| {
array