File tree 3 files changed +3
-3
lines changed
pragma-node/src/handlers/entries
3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ impl From<crate::Entry> for Entry {
27
27
pair_id : entry. pair_id ,
28
28
publisher : entry. publisher ,
29
29
source : entry. source ,
30
- timestamp : entry. timestamp . and_utc ( ) . timestamp ( ) as u64 ,
30
+ timestamp : entry. timestamp . and_utc ( ) . timestamp_millis ( ) as u64 ,
31
31
price : entry. price . to_u128 ( ) . unwrap_or ( 0 ) , // change default value ?
32
32
}
33
33
}
Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ fn adapt_entry_to_entry_response(
83
83
) -> GetEntryResponse {
84
84
GetEntryResponse {
85
85
pair_id,
86
- timestamp : entry. time . and_utc ( ) . timestamp ( ) as u64 ,
86
+ timestamp : entry. time . and_utc ( ) . timestamp_millis ( ) as u64 ,
87
87
num_sources_aggregated : entry. num_sources as usize ,
88
88
price : format ! (
89
89
"0x{}" ,
Original file line number Diff line number Diff line change @@ -150,7 +150,7 @@ pub struct GetEntryParams {
150
150
impl Default for GetEntryParams {
151
151
fn default ( ) -> Self {
152
152
Self {
153
- timestamp : Some ( chrono:: Utc :: now ( ) . timestamp ( ) ) ,
153
+ timestamp : Some ( chrono:: Utc :: now ( ) . timestamp_millis ( ) ) ,
154
154
interval : Some ( Interval :: default ( ) ) ,
155
155
routing : Some ( false ) ,
156
156
aggregation : Some ( AggregationMode :: default ( ) ) ,
You can’t perform that action at this time.
0 commit comments