Fix time overflow

This commit is contained in:
Ethan O'Brien
2026-04-10 11:53:48 -05:00
parent 86e1e6050a
commit 0d79deddae
2 changed files with 4 additions and 2 deletions

2
Cargo.lock generated
View File

@@ -678,7 +678,7 @@ dependencies = [
[[package]]
name = "ew"
version = "1.0.0"
version = "1.1.0"
dependencies = [
"actix-web",
"aes",

View File

@@ -161,7 +161,9 @@ pub fn set_time(current_time: u64, uid: i64, max: bool) -> u64 {
return current_time;
}
let time_since_set = current_time - time_set;
let time_since_set = if current_time > time_set {
current_time - time_set
} else { 0 };
return server_time + time_since_set;
}