diff options
| author | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-08-10 13:42:19 +0200 |
|---|---|---|
| committer | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-08-10 13:42:19 +0200 |
| commit | c97d919628f2fe0f166bad8c4b44d24462e25b96 (patch) | |
| tree | 02d73676ce9f8770c37617ffc4c1b97f3eadd114 | |
| parent | 589ed2202dcfe3ae8669ef2e70eea6a482f195e4 (diff) | |
Server: Make the default time zero Unix
| -rw-r--r-- | internal/server/common.go | 9 |
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 |
