File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ fancy-regex = "0.14.0"
2222glob = " 0.3.2"
2323indexmap = " 2.2.6"
2424nom = " 7.1.3"
25- pyo3 = { version = " =0.24.2 " , features = [" chrono" ] }
25+ pyo3 = { version = " =0.25.0 " , features = [" chrono" ] }
2626rayon = " 1.10.0"
2727regex = " 1.10.4"
2828serde = { version = " 1.0.200" , features = [" derive" ] }
Original file line number Diff line number Diff line change 11use anyhow:: { anyhow, Result } ;
2+ use chrono:: offset:: FixedOffset ;
23use chrono:: offset:: Local ;
34use chrono:: DateTime ;
45use pyo3:: prelude:: * ;
@@ -29,8 +30,11 @@ pub struct NodeInfoMeta {
2930 #[ pyo3( get) ]
3031 pub environment : String ,
3132 #[ pyo3( get) ]
32- /// `chrono::DateTime<Local>` at which we started rendering the data for the node
33- render_time : DateTime < Local > ,
33+ /// `chrono::DateTime<FixedOffset>` at which we started rendering the data for the node
34+ ///
35+ /// When creating the value we convert a `DateTime<Local>` to a `DateTime<FixedOffset> since
36+ /// PyO3 can't convert `DateTime<Local>` to a `PyDateTime` anymore.
37+ render_time : DateTime < FixedOffset > ,
3438}
3539
3640impl Default for NodeInfoMeta {
@@ -55,7 +59,7 @@ impl NodeInfoMeta {
5559 name : name. into ( ) ,
5660 uri : uri. into ( ) ,
5761 environment : environment. into ( ) ,
58- render_time : Local :: now ( ) ,
62+ render_time : Local :: now ( ) . into ( ) ,
5963 }
6064 }
6165
You can’t perform that action at this time.
0 commit comments