summaryrefslogtreecommitdiff
path: root/lang/perl5/patches/patch-ci
blob: 8cab67363e0bb290e279e4d2adc69f3aea2da9cb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
$NetBSD: patch-ci,v 1.2 2005/08/06 06:18:45 jlam Exp $

--- pp_sys.c.orig	2005-04-27 18:12:46.000000000 -0400
+++ pp_sys.c
@@ -4466,9 +4466,11 @@ PP(pp_gmtime)
 	when = (Time_t)SvIVx(POPs);
 #endif
 
-    if (PL_op->op_type == OP_LOCALTIME)
+    if (PL_op->op_type == OP_LOCALTIME) {
+	/* Explicitly invoke tzset() as localtime_r may not. */
+	tzset();
 	tmbuf = localtime(&when);
-    else
+    } else
 	tmbuf = gmtime(&when);
 
     if (GIMME != G_ARRAY) {