mirror of
https://gitea.psi.ch/ELOG/elog.git
synced 2026-09-08 17:13:56 +00:00
Use ts->tm_isdst instead daylight
SVN revision: 157
This commit is contained in:
parent
3c7fd1b8dc
commit
42f0f96a91
5
elogd.c
5
elogd.c
@ -6,6 +6,9 @@
|
||||
Contents: Web server program for Electronic Logbook ELOG
|
||||
|
||||
$Log$
|
||||
Revision 2.33 2002/06/26 11:53:43 midas
|
||||
Use ts->tm_isdst instead daylight
|
||||
|
||||
Revision 2.32 2002/06/26 11:44:54 midas
|
||||
Fixed bug when deleting last message in logbook
|
||||
|
||||
@ -691,7 +694,7 @@ struct tm *ts;
|
||||
ts = localtime(&now);
|
||||
strftime(buf, sizeof(buf), "%a, %d %b %Y %H:%M:%S", ts);
|
||||
offset = (-(int)timezone);
|
||||
if (daylight)
|
||||
if (ts->tm_isdst)
|
||||
offset += 3600;
|
||||
snprintf(str, sizeof(str) - 1, "Date: %s %+03d%02d\r\n\r\n", buf,
|
||||
(int) (offset/3600), (int) ((abs((int)offset)/60) % 60));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user