]> granicus.if.org Git - icu/commitdiff
ICU-8661 add a comment about #else part of uprv_timezone()
authorJungshik Shin <jshin@chromium.org>
Thu, 28 Jun 2012 23:01:26 +0000 (23:01 +0000)
committerJungshik Shin <jshin@chromium.org>
Thu, 28 Jun 2012 23:01:26 +0000 (23:01 +0000)
X-SVN-Rev: 32009

icu4c/source/common/putil.cpp

index 74ebda9f472b1fb230f8b38215e93067c3b8842a..36fab488495a6eea600c8ca2269ecee8322102cc 100644 (file)
@@ -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;