@@ -158,43 +158,44 @@ TEST(Format, Basics) {
158158
159159TEST (Format, PosixConversions) {
160160 const time_zone tz = utc_time_zone ();
161- auto tp = chrono::system_clock::from_time_t (0 );
161+ auto tp =
162+ chrono::system_clock::from_time_t (308189482 ); // 1979-10-08T00:11:22Z
162163
163- TestFormatSpecifier (tp, tz, " %d" , " 01 " );
164- TestFormatSpecifier (tp, tz, " %e" , " 1 " ); // extension but internal support
164+ TestFormatSpecifier (tp, tz, " %d" , " 08 " );
165+ TestFormatSpecifier (tp, tz, " %e" , " 8 " ); // extension but internal support
165166 TestFormatSpecifier (tp, tz, " %H" , " 00" );
166167 TestFormatSpecifier (tp, tz, " %I" , " 12" );
167- TestFormatSpecifier (tp, tz, " %j" , " 001 " );
168- TestFormatSpecifier (tp, tz, " %m" , " 01 " );
169- TestFormatSpecifier (tp, tz, " %M" , " 00 " );
170- TestFormatSpecifier (tp, tz, " %S" , " 00 " );
171- TestFormatSpecifier (tp, tz, " %U" , " 00 " );
172- TestFormatSpecifier (tp, tz, " %w" , " 4 " ); // 4=Thursday
173- TestFormatSpecifier (tp, tz, " %W" , " 00 " );
174- TestFormatSpecifier (tp, tz, " %y" , " 70 " );
175- TestFormatSpecifier (tp, tz, " %Y" , " 1970 " );
168+ TestFormatSpecifier (tp, tz, " %j" , " 281 " );
169+ TestFormatSpecifier (tp, tz, " %m" , " 10 " );
170+ TestFormatSpecifier (tp, tz, " %M" , " 11 " );
171+ TestFormatSpecifier (tp, tz, " %S" , " 22 " );
172+ TestFormatSpecifier (tp, tz, " %U" , " 40 " );
173+ TestFormatSpecifier (tp, tz, " %w" , " 1 " ); // 1=Monday
174+ TestFormatSpecifier (tp, tz, " %W" , " 41 " );
175+ TestFormatSpecifier (tp, tz, " %y" , " 79 " );
176+ TestFormatSpecifier (tp, tz, " %Y" , " 1979 " );
176177 TestFormatSpecifier (tp, tz, " %z" , " +0000" );
177178 TestFormatSpecifier (tp, tz, " %Z" , " UTC" );
178179 TestFormatSpecifier (tp, tz, " %%" , " %" );
179180
180181#if defined(__linux__)
181182 // SU/C99/TZ extensions
182183 TestFormatSpecifier (tp, tz, " %C" , " 19" );
183- TestFormatSpecifier (tp, tz, " %D" , " 01/01/70 " );
184- TestFormatSpecifier (tp, tz, " %F" , " 1970-01-01 " );
185- TestFormatSpecifier (tp, tz, " %g" , " 70 " );
186- TestFormatSpecifier (tp, tz, " %G" , " 1970 " );
184+ TestFormatSpecifier (tp, tz, " %D" , " 10/08/79 " );
185+ TestFormatSpecifier (tp, tz, " %F" , " 1979-10-08 " );
186+ TestFormatSpecifier (tp, tz, " %g" , " 79 " );
187+ TestFormatSpecifier (tp, tz, " %G" , " 1979 " );
187188#if defined(__GLIBC__)
188189 TestFormatSpecifier (tp, tz, " %k" , " 0" );
189190 TestFormatSpecifier (tp, tz, " %l" , " 12" );
190191#endif
191192 TestFormatSpecifier (tp, tz, " %n" , " \n " );
192- TestFormatSpecifier (tp, tz, " %R" , " 00:00 " );
193+ TestFormatSpecifier (tp, tz, " %R" , " 00:11 " );
193194 TestFormatSpecifier (tp, tz, " %t" , " \t " );
194- TestFormatSpecifier (tp, tz, " %T" , " 00:00:00 " );
195- TestFormatSpecifier (tp, tz, " %u" , " 4 " ); // 4=Thursday
196- TestFormatSpecifier (tp, tz, " %V" , " 01 " );
197- TestFormatSpecifier (tp, tz, " %s" , " 0 " );
195+ TestFormatSpecifier (tp, tz, " %T" , " 00:11:22 " );
196+ TestFormatSpecifier (tp, tz, " %u" , " 1 " ); // 1=Monday
197+ TestFormatSpecifier (tp, tz, " %V" , " 41 " );
198+ TestFormatSpecifier (tp, tz, " %s" , " 308189482 " );
198199#endif
199200}
200201
0 commit comments