1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-02-15 04:32:24 +00:00

dtcm: change to use _XLocaltime instead of localtime consitently

This commit is contained in:
OBATA Akio 2021-10-18 17:12:00 +09:00
parent fb91c9416d
commit 87bdee3d19

View file

@ -86,6 +86,12 @@
#include "delete.h"
#include "update.h"
#define XOS_USE_NO_LOCKING
#define X_INCLUDE_TIME_H
#if defined(__linux__)
#undef SVR4
#endif
#include <X11/Xos_r.h>
extern int debug;
extern char *pgname;
@ -1413,6 +1419,7 @@ _DtCm_rtable_gmtoff_4_svc(void *args, struct svc_req *svcrq)
#if !defined(CSRG_BASED)
extern long timezone;
#else
_Xltimeparams localtime_buf;
time_t ctime;
struct tm *t;
#endif
@ -1422,7 +1429,7 @@ _DtCm_rtable_gmtoff_4_svc(void *args, struct svc_req *svcrq)
#if defined(CSRG_BASED)
ctime = time(NULL);
t = localtime(&ctime);
t = _XLocaltime(&ctime, localtime_buf);
gmtoff = - t->tm_gmtoff;
#else
gmtoff = timezone;