]> Savannah Git Hosting - gnulib.git/commitdiff
tzset: update doc for TZ problems on MS-Windows
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 2 May 2017 01:00:56 +0000 (18:00 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 2 May 2017 01:01:42 +0000 (18:01 -0700)
* doc/posix-functions/ctime.texi,  doc/posix-functions/daylight.texi:
* doc/posix-functions/localtime.texi, doc/posix-functions/mktime.texi:
* doc/posix-functions/strftime.texi, doc/posix-functions/timezone.texi:
* doc/posix-functions/tzname.texi, doc/posix-functions/tzset.texi:
* doc/posix-functions/wcsftime.texi:
Mention some issues with TZ under MS-Windows.

ChangeLog
doc/posix-functions/ctime.texi
doc/posix-functions/daylight.texi
doc/posix-functions/localtime.texi
doc/posix-functions/mktime.texi
doc/posix-functions/strftime.texi
doc/posix-functions/timezone.texi
doc/posix-functions/tzname.texi
doc/posix-functions/tzset.texi
doc/posix-functions/wcsftime.texi

index c9b61469fb6d4f8f756ea738c87b39b93b1c7072..ad44003eadd30679d384f0c11311c80923fd1c6a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2017-05-01  Paul Eggert  <eggert@cs.ucla.edu>
+
+       tzset: update doc for TZ problems on MS-Windows
+       * doc/posix-functions/ctime.texi,  doc/posix-functions/daylight.texi:
+       * doc/posix-functions/localtime.texi, doc/posix-functions/mktime.texi:
+       * doc/posix-functions/strftime.texi, doc/posix-functions/timezone.texi:
+       * doc/posix-functions/tzname.texi, doc/posix-functions/tzset.texi:
+       * doc/posix-functions/wcsftime.texi:
+       Mention some issues with TZ under MS-Windows.
+
 2017-05-01  Bruno Haible  <bruno@clisp.org>
 
        copy-file: Fix build error on mingw.
index 6abc4c4b53e0c29f05f6e7a2938074706716d88f..7294f332025bb4019d8fe12bc20ee7fa6434f51c 100644 (file)
@@ -24,6 +24,9 @@ typically write the timestamp into static buffer.  If two threads
 call @code{ctime} at roughly the same time, you might end up with the
 wrong date in one of the threads, or some undefined string.  There is
 a re-entrant interface @code{ctime_r}.
+@item
+Native Windows platforms (mingw, MSVC) support only a subset of time
+zones supported by GNU or specified by POSIX.  @xref{tzset}.
 @end itemize
 
 A more flexible function is @code{strftime}.  However, note that it is
index d5d7a5c76bb0badb70a14bbb8155b943b54c8716..4f40543cfb44ffbc00c507d3700fb38826db04ef 100644 (file)
@@ -18,4 +18,10 @@ Mac OS X 10.3, FreeBSD 6.0, OpenBSD 3.8, IRIX 6.5, OSF/1 5.1.
 @item
 The address of this variable is not a compile-time constant on some platforms:
 Cygwin, mingw.
+@item
+Native Windows platforms (mingw, MSVC) support only a subset of time
+zones supported by GNU or specified by POSIX.  @xref{tzset}.
 @end itemize
+
+A more portable way of getting the UTC offset is to use
+@code{strftime} with the @code{%z} format.  @xref{strftime}.
index 74d4a6a48ec48ec36cf35d1f05d037f1c8051c38..02d069cc1ea5d167625247c360bf239a3a97372c 100644 (file)
@@ -19,4 +19,7 @@ Portability problems not fixed by Gnulib:
 On some platforms, this function returns nonsense values for
 unsupported arguments (like @math{2^56}), rather than failing:
 FreeBSD 10.
+@item
+Native Windows platforms (mingw, MSVC) support only a subset of time
+zones supported by GNU or specified by POSIX.  @xref{tzset}.
 @end itemize
index 35a9a41e7e7b8a4f02930282c835e0c5eb46a4b6..6187dc79b47b854174e0319027a14117cb969085 100644 (file)
@@ -19,4 +19,7 @@ when the environment variable @code{TZ} has been set by Cygwin.
 
 Portability problems not fixed by Gnulib:
 @itemize
+@item
+Native Windows platforms (mingw, MSVC) support only a subset of time
+zones supported by GNU or specified by POSIX.  @xref{tzset}.
 @end itemize
index 0c2d992f93c55d2b0c9ea24e32a65124e1a8457f..dd5272049918efaa5615b12f1c0bd81f42327159 100644 (file)
@@ -19,6 +19,9 @@ Portability problems not fixed by Gnulib:
 The Windows C runtime library (which is used by MinGW) does not
 support the %e specifier (and possibly the other more recent SUS
 specifiers too, i.e., %C, %D, %h, %n, %r, %R, %t, and %T).
+@item
+Native Windows platforms (mingw, MSVC) support only a subset of time
+zones supported by GNU or specified by POSIX.  @xref{tzset}.
 @end itemize
 
 Extension: Gnulib offers a module @samp{strftime} that provides an
index dfadb356eda08d2b4126693fc4452298dffb97b7..fa1ae7ef70ec643806fd56f083b19dc9c4ed5218 100644 (file)
@@ -18,4 +18,10 @@ IRIX 6.5, OSF/1 5.1, mingw.
 @item
 The address of this variable is not a compile-time constant on some platforms:
 mingw.
+@item
+Native Windows platforms (mingw, MSVC) support only a subset of time
+zones supported by GNU or specified by POSIX.  @xref{tzset}.
 @end itemize
+
+A more portable way of getting the UTC offset is to use
+@code{strftime} with the @code{%z} format.  @xref{strftime}.
index d28cef0e0a389c91293ffb7e781015498800a9d0..8441529b9e2733258d111f5ade83b112174b85b3 100644 (file)
@@ -18,4 +18,10 @@ IRIX 6.5, OSF/1 5.1, mingw.
 @item
 The address of this variable is not a compile-time constant on some platforms:
 Cygwin, mingw.
+@item
+Native Windows platforms (mingw, MSVC) support only a subset of time
+zones supported by GNU or specified by POSIX.  @xref{tzset}.
 @end itemize
+
+A more portable way of getting the time zone abbreviation is to use
+@code{strftime} with the @code{%Z} format.  @xref{strftime}.
index a457409352a1ad4e3dc4a5f9d7a9a6129fec5108..2e16cb4a083bef9b71db9c034c649edf98c55604 100644 (file)
@@ -19,4 +19,13 @@ Solaris 2.6.
 
 Portability problems not fixed by Gnulib:
 @itemize
+@item
+Native Windows platforms (mingw, MSVC) support only a subset of
+POSIX-specified values for the @env{TZ} environment variable,
+consisting of a time zone abbreviation containing exactly three ASCII
+letters with no daylight saving time or angle brackets, and with no
+support for @code{tz} database settings like
+@code{TZ='America/New_York'}.  Even this subset does not work on
+applications built via the Universal Windows Platform, as it does not
+make environment variables like @env{TZ} available to applications.
 @end itemize
index 931b81c1a16d1a87681a22e6d3f12e92dd0afb56..0e4a951cc1d27a97a8f76226565b04212865af5f 100644 (file)
@@ -21,4 +21,7 @@ OpenBSD 3.8, Minix 3.1.8, IRIX 5.3, Solaris 2.5.1, Cygwin 1.5.x, BeOS.
 @item
 On AIX and Windows platforms, @code{wchar_t} is a 16-bit type and therefore cannot
 accommodate all Unicode characters.
+@item
+Native Windows platforms (mingw, MSVC) support only a subset of time
+zones specified by POSIX.  @xref{tzset}.
 @end itemize