@@ -169,45 +169,44 @@ TEST(Format, Basics) {
169169
170170TEST (Format, PosixConversions) {
171171 const time_zone tz = utc_time_zone ();
172- auto tp = chrono::system_clock::from_time_t (0 );
172+ auto tp =
173+ chrono::system_clock::from_time_t (308189482 ); // 1979-10-08T00:11:22Z
173174
174- TestFormatSpecifier (tp, tz, " %d" , " 01 " );
175- TestFormatSpecifier (tp, tz, " %e" , " 1 " ); // extension but internal support
175+ TestFormatSpecifier (tp, tz, " %d" , " 08 " );
176+ TestFormatSpecifier (tp, tz, " %e" , " 8 " ); // extension but internal support
176177 TestFormatSpecifier (tp, tz, " %H" , " 00" );
177178 TestFormatSpecifier (tp, tz, " %I" , " 12" );
178- TestFormatSpecifier (tp, tz, " %j" , " 001" );
179- TestFormatSpecifier (tp, tz, " %m" , " 01" );
180- TestFormatSpecifier (tp, tz, " %M" , " 00" );
181- TestFormatSpecifier (tp, tz, " %S" , " 00" );
182- TestFormatSpecifier (tp, tz, " %U" , " 00" );
183- #if !defined(__EMSCRIPTEN__)
184- TestFormatSpecifier (tp, tz, " %w" , " 4" ); // 4=Thursday
185- #endif
186- TestFormatSpecifier (tp, tz, " %W" , " 00" );
187- TestFormatSpecifier (tp, tz, " %y" , " 70" );
188- TestFormatSpecifier (tp, tz, " %Y" , " 1970" );
179+ TestFormatSpecifier (tp, tz, " %j" , " 281" );
180+ TestFormatSpecifier (tp, tz, " %m" , " 10" );
181+ TestFormatSpecifier (tp, tz, " %M" , " 11" );
182+ TestFormatSpecifier (tp, tz, " %S" , " 22" );
183+ TestFormatSpecifier (tp, tz, " %U" , " 40" );
184+ TestFormatSpecifier (tp, tz, " %w" , " 1" ); // 1=Monday
185+ TestFormatSpecifier (tp, tz, " %W" , " 41" );
186+ TestFormatSpecifier (tp, tz, " %y" , " 79" );
187+ TestFormatSpecifier (tp, tz, " %Y" , " 1979" );
189188 TestFormatSpecifier (tp, tz, " %z" , " +0000" );
190189 TestFormatSpecifier (tp, tz, " %Z" , " UTC" );
191190 TestFormatSpecifier (tp, tz, " %%" , " %" );
192191
193192#if defined(__linux__)
194193 // SU/C99/TZ extensions
195194 TestFormatSpecifier (tp, tz, " %C" , " 19" );
196- TestFormatSpecifier (tp, tz, " %D" , " 01/01/70 " );
197- TestFormatSpecifier (tp, tz, " %F" , " 1970-01-01 " );
198- TestFormatSpecifier (tp, tz, " %g" , " 70 " );
199- TestFormatSpecifier (tp, tz, " %G" , " 1970 " );
195+ TestFormatSpecifier (tp, tz, " %D" , " 10/08/79 " );
196+ TestFormatSpecifier (tp, tz, " %F" , " 1979-10-08 " );
197+ TestFormatSpecifier (tp, tz, " %g" , " 79 " );
198+ TestFormatSpecifier (tp, tz, " %G" , " 1979 " );
200199#if defined(__GLIBC__)
201200 TestFormatSpecifier (tp, tz, " %k" , " 0" );
202201 TestFormatSpecifier (tp, tz, " %l" , " 12" );
203202#endif
204203 TestFormatSpecifier (tp, tz, " %n" , " \n " );
205- TestFormatSpecifier (tp, tz, " %R" , " 00:00 " );
204+ TestFormatSpecifier (tp, tz, " %R" , " 00:11 " );
206205 TestFormatSpecifier (tp, tz, " %t" , " \t " );
207- TestFormatSpecifier (tp, tz, " %T" , " 00:00:00 " );
208- TestFormatSpecifier (tp, tz, " %u" , " 4 " ); // 4=Thursday
209- TestFormatSpecifier (tp, tz, " %V" , " 01 " );
210- TestFormatSpecifier (tp, tz, " %s" , " 0 " );
206+ TestFormatSpecifier (tp, tz, " %T" , " 00:11:22 " );
207+ TestFormatSpecifier (tp, tz, " %u" , " 1 " ); // 1=Monday
208+ TestFormatSpecifier (tp, tz, " %V" , " 41 " );
209+ TestFormatSpecifier (tp, tz, " %s" , " 308189482 " );
211210#endif
212211}
213212
0 commit comments