mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-02-15 04:32:24 +00:00
dtcm: fix localtime()
usage
It is expexted the first argument is `*time_t`, not `time_t`.
This commit is contained in:
parent
6ad08f9948
commit
224f04cb29
1 changed files with 3 additions and 1 deletions
|
@ -1413,6 +1413,7 @@ _DtCm_rtable_gmtoff_4_svc(void *args, struct svc_req *svcrq)
|
||||||
#if !defined(CSRG_BASED)
|
#if !defined(CSRG_BASED)
|
||||||
extern long timezone;
|
extern long timezone;
|
||||||
#else
|
#else
|
||||||
|
time_t ctime;
|
||||||
struct tm *t;
|
struct tm *t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1420,7 +1421,8 @@ _DtCm_rtable_gmtoff_4_svc(void *args, struct svc_req *svcrq)
|
||||||
fprintf(stderr, "_DtCm_rtable_gmtoff_4_svc called\n");
|
fprintf(stderr, "_DtCm_rtable_gmtoff_4_svc called\n");
|
||||||
|
|
||||||
#if defined(CSRG_BASED)
|
#if defined(CSRG_BASED)
|
||||||
t = localtime(time(NULL));
|
ctime = time(NULL);
|
||||||
|
t = localtime(&ctime);
|
||||||
gmtoff = t->tm_gmtoff;
|
gmtoff = t->tm_gmtoff;
|
||||||
#else
|
#else
|
||||||
gmtoff = timezone;
|
gmtoff = timezone;
|
||||||
|
|
Loading…
Reference in a new issue