Migrate datetimes to UTC
This commit is contained in:
committed by
nitnelave
parent
848cc86d73
commit
0ecd9ed263
1
app/src/graphql.rs
Normal file
1
app/src/graphql.rs
Normal file
@@ -0,0 +1 @@
|
||||
pub type DateTimeUtc = chrono::DateTime<chrono::Utc>;
|
||||
@@ -4,6 +4,7 @@ mod api;
|
||||
mod app;
|
||||
mod cookies;
|
||||
mod create_user;
|
||||
mod graphql;
|
||||
mod login;
|
||||
mod logout;
|
||||
mod user_details;
|
||||
|
||||
@@ -10,7 +10,7 @@ use yew::services::{fetch::FetchTask, ConsoleService};
|
||||
schema_path = "../schema.graphql",
|
||||
query_path = "queries/list_users.graphql",
|
||||
response_derives = "Debug",
|
||||
custom_scalars_module = "chrono"
|
||||
custom_scalars_module = "crate::graphql"
|
||||
)]
|
||||
pub struct ListUsersQuery;
|
||||
|
||||
@@ -89,7 +89,7 @@ impl Component for UserTable {
|
||||
<td>{&u.display_name.as_ref().unwrap_or(&String::new())}</td>
|
||||
<td>{&u.first_name.as_ref().unwrap_or(&String::new())}</td>
|
||||
<td>{&u.last_name.as_ref().unwrap_or(&String::new())}</td>
|
||||
<td>{&u.creation_date}</td>
|
||||
<td>{&u.creation_date.with_timezone(&chrono::Local)}</td>
|
||||
</tr>
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user