summaryrefslogtreecommitdiff
path: root/editcap.c
diff options
context:
space:
mode:
authorLuis Ontanon <luis.ontanon@gmail.com>2006-10-23 14:57:54 +0000
committerLuis Ontanon <luis.ontanon@gmail.com>2006-10-23 14:57:54 +0000
commitb09b3c5f46a4bcd104622e190d359b753ddbb252 (patch)
tree42cfcf9701a20d4a3feb53d011645310f61ad8fb /editcap.c
parent6e3dd0c7229f0e40b167cda0f936f3554bab16fb (diff)
downloadwireshark-b09b3c5f46a4bcd104622e190d359b753ddbb252.tar.gz
As proposed by Tim Furlong:
set starttm.tm_isdst to -1 to have mktime() propperly interpret DST. Might fix Bug 1158 svn path=/trunk/; revision=19662
Diffstat (limited to 'editcap.c')
-rw-r--r--editcap.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/editcap.c b/editcap.c
index 791689c6ca..923642f39b 100644
--- a/editcap.c
+++ b/editcap.c
@@ -476,7 +476,7 @@ int main(int argc, char *argv[])
struct tm starttm;
memset(&starttm,0,sizeof(struct tm));
-
+
if(!strptime(optarg,"%F %T",&starttm)) {
fprintf(stderr, "editcap: \"%s\" isn't a valid time format\n\n",
optarg);
@@ -484,6 +484,8 @@ int main(int argc, char *argv[])
}
check_startstop = TRUE;
+ starttm.tm_isdst = -1;
+
starttime = mktime(&starttm);
break;
}
@@ -499,6 +501,7 @@ int main(int argc, char *argv[])
exit(1);
}
check_startstop = TRUE;
+ stoptm.tm_isdst = -1;
stoptime = mktime(&stoptm);
break;
}