summaryrefslogtreecommitdiffstats
path: root/mbbsd/cal.c
diff options
context:
space:
mode:
Diffstat (limited to 'mbbsd/cal.c')
-rw-r--r--mbbsd/cal.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mbbsd/cal.c b/mbbsd/cal.c
index c0160ffd..d0233bc5 100644
--- a/mbbsd/cal.c
+++ b/mbbsd/cal.c
@@ -497,8 +497,9 @@ int
resolve_over18_user(const userec_t *u)
{
/* get local time */
- struct tm ptime = *localtime4(&now);
+ struct tm ptime;
+ localtime4_r(&now, &ptime);
// 照實歲計算,沒生日的當作未滿 18
if (u->year < 1 || u->month < 1)
return 0;