From: Jungshik Shin Date: Thu, 28 Jun 2012 23:01:26 +0000 (+0000) Subject: ICU-8661 add a comment about #else part of uprv_timezone() X-Git-Tag: milestone-59-0-1~3735 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0a783f3908b93342ac855000960717505f044c03;p=icu ICU-8661 add a comment about #else part of uprv_timezone() X-SVN-Rev: 32009 --- diff --git a/icu4c/source/common/putil.cpp b/icu4c/source/common/putil.cpp index 74ebda9f472..36fab488495 100644 --- a/icu4c/source/common/putil.cpp +++ b/icu4c/source/common/putil.cpp @@ -649,7 +649,14 @@ uprv_timezone() t2 = mktime(&tmrec); /* GMT (or UTC) in seconds*/ tdiff = t2 - t1; /* imitate NT behaviour, which returns same timezone offset to GMT for - winter and summer*/ + winter and summer. + This does not work on all platforms. For instance, on glibc on Linux + and on Mac OS 10.5, tdiff calculated above remains the same + regardless of whether DST is in effect or not. However, U_TIMEZONE + is defined on those platforms and this code is not reached so that + we can leave this alone. If there's a platform behaving + like glibc that uses this code, we need to add platform-dependent + preprocessor here. */ if (dst_checked) tdiff += 3600; return tdiff;