X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Ftime%2Ftimezone.cpp;h=a96e1b51be34ef6672239c358210d4b766d212d5;hb=c8c97ab483cfbf1bb3d0788cf729be92091ba2fc;hp=9c146249208da8206ae6c1c937526afcde56fe21;hpb=b56eb5ec1da675da0c66abc53c1e4f6c4e4cccbd;p=libs%2Fcore.git diff --git a/source/time/timezone.cpp b/source/time/timezone.cpp index 9c14624..a96e1b5 100644 --- a/source/time/timezone.cpp +++ b/source/time/timezone.cpp @@ -102,7 +102,7 @@ TimeZone get_local_timezone() close(fd); if(gmtoff!=-1) - return TimeZone(-gmtoff/60, name); + return TimeZone(gmtoff/60, name); } return TimeZone(); #endif @@ -117,15 +117,15 @@ TimeZone::TimeZone(): name("UTC") { } -TimeZone::TimeZone(int minutes_west): - offset(minutes_west*min) +TimeZone::TimeZone(int minutes): + offset(minutes*min) { - if(minutes_west) + if(minutes) { ostringstream ss; ss.fill('0'); - int m = abs(minutes_west); - ss<<"UTC"<<(minutes_west<0 ? '-' : '+')<