mirror of
https://github.com/cyberarm/w3d_hub_linux_launcher.git
synced 2026-11-03 16:44:05 +00:00
If server remaining time is negative then the match is proably over, report 0 seconds remaining instead of ~4 days :D
This commit is contained in:
@@ -67,6 +67,7 @@ module W3DHubLauncher
|
||||
return "∞" unless @estimated_end_time
|
||||
|
||||
remaining_seconds = @estimated_end_time.utc.to_i - Time.now.utc.to_i
|
||||
remaining_seconds = 0 if remaining_seconds.negative?
|
||||
|
||||
hours = (remaining_seconds / 60.0 / 60.0).floor % 100
|
||||
minutes = (remaining_seconds / 60.0).floor % 60
|
||||
|
||||
Reference in New Issue
Block a user