summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1771039)
raw | patch | inline | side by side (parent: 1771039)
author | Linus Torvalds <torvalds@ppc970.osdl.org> | |
Sat, 30 Apr 2005 21:25:02 +0000 (14:25 -0700) | ||
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | |
Sat, 30 Apr 2005 21:25:02 +0000 (14:25 -0700) |
date.c | patch | blob | history |
index b59e832d6c58d94e2ab9e4027fb0de11e8987e13..ffa4246aa04cae3775ef29307362651fc31191c3 100644 (file)
--- a/date.c
+++ b/date.c
tm.tm_year = -1;
tm.tm_mon = -1;
tm.tm_mday = -1;
- offset = 0;
+ tm.tm_isdst = -1;
+ offset = -1;
for (;;) {
int match = 0;
date += match;
}
- then = my_mktime(&tm); /* mktime uses local timezone */
+ /* mktime uses local timezone */
+ then = my_mktime(&tm);
+ if (offset == -1)
+ offset = (then - mktime(&tm)) / 60;
+
if (then == -1)
return;