summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--internal/server/common.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/internal/server/common.go b/internal/server/common.go
index 6257a4d..e8c837a 100644
--- a/internal/server/common.go
+++ b/internal/server/common.go
@@ -134,7 +134,14 @@ func getServerInfoScreen(base ServerBase) ServerInfoScreen {
serverInfoScreen.DisplayName = base.DisplayName
serverInfoScreen.SupportContact = base.SupportContact
serverInfoScreen.Profiles = base.Profiles
- serverInfoScreen.ExpireTime = base.EndTime.Unix()
+
+ // If we still have the default end time, return 0
+ // Such that clients will still be able to parse it correctly
+ if base.EndTime.IsZero() {
+ serverInfoScreen.ExpireTime = 0
+ } else {
+ serverInfoScreen.ExpireTime = base.EndTime.Unix()
+ }
serverInfoScreen.Type = base.Type
return serverInfoScreen