mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-06 06:52:39 +00:00
Moves as many db related date/time operations to the db side to avoid byond bugs with dates and times. (#83193)
While we try to have the datetimes of all vms synced to within 100ms of eachother, via a cluster of time servers and intercepting all ntp traffic in the vm lan towards the cluster, this isn't perfect and so things putting time onto the database server should use the time at the database server as much as it can. To avoid confusion, i have renamed `SQLtime()` to `ISOtime()` to avoid the likely hood its cargo culted onto database code again. ISOtime is still a bad name, but there isn't a good name for this kind of time format, like ISO8601, but human readable (so no `T` between date and time and less other nonsense), with an assumption of GMT, thats not SQLtime(), and SQLtime(). Suggestions welcome. also byond's time procs can bug out because of how cursed they operate, case in point, this year 2054 item that got inserted into the legacy population table: 
This commit is contained in:
committed by
GitHub
parent
348d69c607
commit
a8dda646a1
@@ -800,7 +800,7 @@
|
||||
return
|
||||
var/kn = key_name(usr)
|
||||
var/kna = key_name_admin(usr)
|
||||
var/change_message = "[usr.client.key] unbanned [target] from [role] on [SQLtime()] during round #[GLOB.round_id]<hr>"
|
||||
var/change_message = "[usr.client.key] unbanned [target] from [role] on [ISOtime()] during round #[GLOB.round_id]<hr>"
|
||||
var/datum/db_query/query_unban = SSdbcore.NewQuery({"
|
||||
UPDATE [format_table_name("ban")] SET
|
||||
unbanned_datetime = NOW(),
|
||||
@@ -845,7 +845,7 @@
|
||||
|
||||
var/kn = key_name(usr)
|
||||
var/kna = key_name_admin(usr)
|
||||
var/change_message = "[usr.client.key] re-activated ban of [target] from [role] on [SQLtime()] during round #[GLOB.round_id]<hr>"
|
||||
var/change_message = "[usr.client.key] re-activated ban of [target] from [role] on [ISOtime()] during round #[GLOB.round_id]<hr>"
|
||||
var/datum/db_query/query_reban = SSdbcore.NewQuery({"
|
||||
UPDATE [format_table_name("ban")] SET
|
||||
unbanned_datetime = NULL,
|
||||
|
||||
Reference in New Issue
Block a user