X-Git-Url: http://git.csclub.uwaterloo.ca/?p=kopensolaris-gnu%2Fglibc.git;a=blobdiff_plain;f=time%2Ftest_time.c;h=a090d93db45c2a0d654857613077b4eb571fecbd;hp=f1e1d3e43c2c502a68db4420570b9ca4423f1122;hb=da78e7e74feee72704a8f5036d7b57a9e0040080;hpb=f743d5a201bc5bf7c637ccef9f252812b5376e18 diff --git a/time/test_time.c b/time/test_time.c index f1e1d3e43c..a090d93db4 100644 --- a/time/test_time.c +++ b/time/test_time.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1994 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -55,6 +55,7 @@ DEFUN(main, (argc, argv), int argc AND char **argv) tbuf.tm_hour = 6; tbuf.tm_min = 14; tbuf.tm_sec = 50; + tbuf.tm_isdst = -1; doit:; t = mktime(&tbuf); if (t == (time_t) -1) @@ -100,7 +101,17 @@ DEFUN(main, (argc, argv), int argc AND char **argv) fputs (buffer, stdout); strftime (buffer, SIZE, "The time is %I:%M %p.\n", loctime); fputs (buffer, stdout); + + loctime->tm_year = 72; + loctime->tm_mon = 8; + loctime->tm_mday = 12; + loctime->tm_hour = 20; + loctime->tm_min = 49; + loctime->tm_sec = 05; + curtime = mktime (loctime); + strftime (buffer, SIZE, "%D %T was %w the %jth.\n", loctime); + fputs (buffer, stdout); } - exit(lose ? EXIT_FAILURE : EXIT_SUCCESS); + return (lose ? EXIT_FAILURE : EXIT_SUCCESS); }