From 11a0f77dd261f7bab8c243ac3baeceb3b5135524 Mon Sep 17 00:00:00 2001
From: deuce <>
Date: Sun, 3 Jul 2005 07:12:10 +0000
Subject: [PATCH] Fix use of uninitialized tv value.

---
 src/xpdev/datewrap.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/xpdev/datewrap.c b/src/xpdev/datewrap.c
index 628765518f..2a36df332b 100644
--- a/src/xpdev/datewrap.c
+++ b/src/xpdev/datewrap.c
@@ -86,7 +86,8 @@ xpDateTime_t xpDateTime_now(void)
 	struct timeval tv;
 	time_t	t;
 
-	t=time(NULL);
+	gettimeofday(&tv, NULL);
+	t=tv.tv_sec;
 	localtime_r(&t,&tm);
 
 	return xpDateTime_create(1900+tm.tm_year,1+tm.tm_mon,tm.tm_mday
-- 
GitLab