File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ serde_derive = { version = "1.0.186", optional = true }
28
28
serde_json = { version = " 1.0.48" , optional = true }
29
29
surf = { version = " 2.2.0" , default-features = false , optional = true }
30
30
thiserror = " 1.0"
31
- time = { version = " 0.3.34 " , optional = true }
31
+ time = { version = " 0.3.39 " , optional = true }
32
32
33
33
[features ]
34
34
default = [" serde" , " reqwest-client-rustls" ]
Original file line number Diff line number Diff line change 87
87
}
88
88
}
89
89
90
+ #[ cfg( feature = "time" ) ]
91
+ impl From < Timestamp > for time:: UtcDateTime {
92
+ fn from ( value : Timestamp ) -> Self {
93
+ time:: UtcDateTime :: from_unix_timestamp_nanos ( value. nanos ( ) as i128 ) . unwrap ( )
94
+ }
95
+ }
96
+
97
+ #[ cfg( feature = "time" ) ]
98
+ impl From < time:: UtcDateTime > for Timestamp {
99
+ fn from ( value : time:: UtcDateTime ) -> Self {
100
+ Timestamp :: Nanoseconds ( value. unix_timestamp_nanos ( ) as u128 )
101
+ }
102
+ }
103
+
90
104
#[ cfg( feature = "time" ) ]
91
105
impl From < Timestamp > for time:: OffsetDateTime {
92
106
fn from ( value : Timestamp ) -> Self {
You can’t perform that action at this time.
0 commit comments