dtcm: resolve mismatch between tm.tm_gmtoff and global timezone
`timezone` and `tm.tm_gmtoff` represent reversed sign value each other. Change `tm.tm_gmtoff` usage to be matched with `timezone`.
This commit is contained in:
@@ -531,7 +531,7 @@ time_t cm_getdate(char *p, struct timeb *now)
|
||||
lt = localtime(&tod);
|
||||
now->time = lt->tm_sec;
|
||||
#ifdef __OpenBSD__
|
||||
now->timezone = lt->tm_gmtoff / 60;
|
||||
now->timezone = - lt->tm_gmtoff / 60;
|
||||
#else
|
||||
now->timezone = timezone/60;
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user