users: store timezone, default is "UTC"
This commit is contained in:
parent
1168e1494c
commit
e49c146dfd
14 changed files with 415 additions and 322 deletions
|
|
@ -22,6 +22,7 @@ impl From<DatabaseUsers> for User {
|
|||
password_recover: db.password_recover,
|
||||
paper_key: db.paper_key,
|
||||
is_archived: db.is_archived,
|
||||
timezone: db.timezone,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -179,4 +180,14 @@ impl User {
|
|||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub async fn set_timezone(
|
||||
&self,
|
||||
conn: impl SqliteExecutor<'_>,
|
||||
timezone: &str,
|
||||
) -> Result<(), Error> {
|
||||
DatabaseUsers::set_timezone(conn, self.id.as_ref(), timezone).await?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue