diff options
author | Luis Ontanon <luis.ontanon@gmail.com> | 2006-10-23 14:57:54 +0000 |
---|---|---|
committer | Luis Ontanon <luis.ontanon@gmail.com> | 2006-10-23 14:57:54 +0000 |
commit | b09b3c5f46a4bcd104622e190d359b753ddbb252 (patch) | |
tree | 42cfcf9701a20d4a3feb53d011645310f61ad8fb /editcap.c | |
parent | 6e3dd0c7229f0e40b167cda0f936f3554bab16fb (diff) | |
download | wireshark-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.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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; } |