G
Gore
hi,
I tried the following piece of code
long sec = -1;
struct tm date;
date.tm_year = 1995 - 1900;
date.tm_mon = 7 - 1;
date.tm_mday = 16;
date.tm_hour = 0;
date.tm_min = 0;
date.tm_sec = 0;
date.tm_isdst = 0;
sec = mktime(&date);
The value returned by mktime when tm_isdst is set to 0 is different
from the value returned by mktime when tm_isdst is set to -1 or 1. Why
is that?
The date given is 16th July 1995 00:00:00.
The compiler is used MSVC 6.0 Service pack 5.
Observed the same behavious on Sun Solaris.
My machine has the us-pacific time set ( GMT - 8 Hours ).
Mihir
I tried the following piece of code
long sec = -1;
struct tm date;
date.tm_year = 1995 - 1900;
date.tm_mon = 7 - 1;
date.tm_mday = 16;
date.tm_hour = 0;
date.tm_min = 0;
date.tm_sec = 0;
date.tm_isdst = 0;
sec = mktime(&date);
The value returned by mktime when tm_isdst is set to 0 is different
from the value returned by mktime when tm_isdst is set to -1 or 1. Why
is that?
The date given is 16th July 1995 00:00:00.
The compiler is used MSVC 6.0 Service pack 5.
Observed the same behavious on Sun Solaris.
My machine has the us-pacific time set ( GMT - 8 Hours ).
Mihir