summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--lib/pure/times.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/pure/times.nim b/lib/pure/times.nim
index 45ed6dd67..b9410e14c 100644
--- a/lib/pure/times.nim
+++ b/lib/pure/times.nim
@@ -1073,7 +1073,7 @@ proc zonedTimeFromAdjTime*(zone: Timezone, adjTime: Time): ZonedTime =
 
 proc `$`*(zone: Timezone): string =
   ## Returns the name of the timezone.
-  zone.name
+  if zone != nil: result = zone.name
 
 proc `==`*(zone1, zone2: Timezone): bool =
   ## Two ``Timezone``'s are considered equal if their name is equal.