Fix double daylight savings time adjustment on UNIX/Linux

svn path=/trunk/boinc/; revision=13910
This commit is contained in:
Charlie Fenton 2007-10-18 23:31:55 +00:00
parent f5dff1892c
commit 7c4d159591
2 changed files with 10 additions and 9 deletions

View File

@ -9629,8 +9629,8 @@ David 17 Oct 2007
Charlie 18 Oct 2007
- Fix compiler warning,
client/
cs_scheduler.C
client/
cs_scheduler.C
David 18 Oct 2007
- client (win): fix time-zone code
@ -9662,3 +9662,9 @@ David 18 Oct 2007
bossa_make_jobs_example.php
user/
bossa_example.php
Charlie 18 Oct 2007
- client: Fix double daylight savings time adjustment on UNIX/Linux.
client/
hostinfo_unix.C

View File

@ -130,13 +130,8 @@ int get_timezone() {
cur_time = time(NULL);
time_data = localtime( &cur_time );
if (time_data->tm_isdst>0) {
// daylight savings in effect
return (time_data->tm_gmtoff)-3600;
} else {
// no daylight savings in effect
return time_data->tm_gmtoff;
}
// tm_gmtoff is already adjusted for daylight savings time
return time_data->tm_gmtoff;
#elif defined(linux)
return -1*(__timezone);
#elif defined(__CYGWIN32__)