✨ (user): Añade zona horaria propia del usuario
Sustituye el campo de texto libre por un selector de zonas horarias IANA canónicas agrupadas por región, con la opción de usar la del sitio (que muestra la zona efectiva).
This commit is contained in:
parent
4cd75af8d2
commit
04502ef81e
20 changed files with 162 additions and 92 deletions
|
|
@ -178,7 +178,7 @@ pub(crate) async fn create_role(data: NewRoleData<'_>) -> Result<i32, AuthError>
|
|||
return Err(AuthError::RoleMachineNameTaken);
|
||||
}
|
||||
|
||||
let now = Utc::now().naive_utc();
|
||||
let now = Utc::now();
|
||||
let new_role = role::ActiveModel {
|
||||
id: ActiveValue::NotSet,
|
||||
machine_name: Set(data.machine_name.to_owned()),
|
||||
|
|
@ -207,7 +207,7 @@ pub(crate) async fn update_role(role_id: i32, data: RoleUpdateData<'_>) -> Resul
|
|||
return Err(AuthError::RoleLocked);
|
||||
}
|
||||
|
||||
let now = Utc::now().naive_utc();
|
||||
let now = Utc::now();
|
||||
role::ActiveModel {
|
||||
id: Set(role_id),
|
||||
label: Set(data.label.to_owned()),
|
||||
|
|
@ -258,7 +258,7 @@ pub(crate) async fn set_role_permissions(
|
|||
}
|
||||
}
|
||||
|
||||
let now = Utc::now().naive_utc();
|
||||
let now = Utc::now();
|
||||
let keys = permission_keys.to_vec();
|
||||
dbconn()
|
||||
.transaction::<_, _, AuthError>(|txn| {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue