mirror of https://github.com/BOINC/boinc.git
Fix double daylight savings time adjustment on UNIX/Linux
svn path=/trunk/boinc/; revision=13910
This commit is contained in:
parent
f5dff1892c
commit
7c4d159591
|
@ -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
|
||||
|
|
|
@ -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__)
|
||||
|
|
Loading…
Reference in New Issue