Skip to content
Snippets Groups Projects
Commit 11a0f77d authored by deuce's avatar deuce
Browse files

Fix use of uninitialized tv value.

parent 3ae6e9f3
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment