[Lsb-messages] /var/www/bzr/lsb/devel/olver-core-tests r96: Add patch with olver test fix to follow glibc interpretation (bug 3774).
Jeff Licquia
licquia at linuxfoundation.org
Wed Jul 10 14:32:11 UTC 2013
------------------------------------------------------------
revno: 96
author: Kurban Mallachiev <mallachiev at ispras.ru>
committer: Jeff Licquia <licquia at linuxfoundation.org>
branch nick: olver-core-tests
timestamp: Wed 2013-07-10 10:32:11 -0400
message:
Add patch with olver test fix to follow glibc interpretation (bug 3774).
modified:
src/model/util/format/tests/wtime_scenario.sec
-------------- next part --------------
=== modified file 'src/model/util/format/tests/wtime_scenario.sec'
--- a/src/model/util/format/tests/wtime_scenario.sec 2009-08-25 16:37:01 +0000
+++ b/src/model/util/format/tests/wtime_scenario.sec 2013-07-10 14:32:11 +0000
@@ -745,6 +745,31 @@
* is zero, the standard time offset is used. If tm_isdst is greater than zero,
* the daylight savings time offset is used. If tm_isdst is negative, no
* characters are returned. [ tm_isdst]
+ *
+ * Additional inerpretation from https://lsbbugs.linuxfoundation.org/show_bug.cgi?id=3774:
+ * Carlos O'Donell 2013-04-07 15:51:32 EDT
+ *
+ * There are two ways to interpret the wording in POSIX and what is stored in 'struct tm':
+ *
+ * (a) If tm_isdst is >0 then the values already stored in the broken down time
+ * had daylight savings applied.
+ *
+ * (b) If tm_isdst is >0 then the values in the broken down time shall be adjusted
+ * by daylight savings when printed. That is to say that the values in the broken
+ * down time must *always* be the non-DST version of those values, with strftime
+ * applying the adjustment at the time of printing.
+ *
+ * The POSIX wording doesn't say what happens if you change the tm_isdst field,
+ * only that if it is >0 the DST-adjusted offset will be used, and if it is 0 the
+ * non-DST offset will be used.
+ *
+ * The most logical and simplest implementation is that the the time in the broken
+ * down time is always the local time with DST applied, and if DST was applied
+ * then tm_isdst is >0 (ignoring tm_isdst <0 which is handled correctly).
+ *
+ * The GNU C Library follows interpretation (a).
+ *
+ * The test has been fixed to follow this interpretation as well.
*/
gret = create_TmT(20, 15, 9, 14, 4, 107, 1, 133, 0, 10800, create_CString("GMT+3") );
REQ_SCEN("wcsftime.strftime.11.35", "%%z Replaced by the offset from UTC, the standard time offset is used",
@@ -759,7 +784,7 @@
REQ_SCEN("wcsftime.strftime.11.35", "%%z Replaced by the offset from UTC, the daylight savings time offset is used",
checkWcsFTime(
- create_WString(convert_to_wcstring("+0400")),
+ create_WString(convert_to_wcstring("+0300")),
create_WString(convert_to_wcstring("%z")),
gret
)
More information about the lsb-messages
mailing list