home *** CD-ROM | disk | FTP | other *** search
- #include <stdarg.h>
- #include <stdlib.h>
- #include "..\stdinc\time.h"
-
- _LL_GETTIME()
- {
- return 0;
- }
- _LL_TICKS()
- {
- return 0;
- }
- void main(void)
- {
- struct tm a;
- int i;
- char buf[1000];
- a.tm_sec = 5;
- a.tm_min = 39;
- a.tm_hour = 13;
- a.tm_mday = 28;
- a.tm_mon = 1;
- a.tm_year = 107;
- a.tm_wday = 3;
- a.tm_yday = 59;
- a.tm_isdst = 0;
- printf("%s\n",ASCTIME(&a));
- a.tm_sec = 5;
- a.tm_min = 39;
- a.tm_hour = 0;
- a.tm_mday = 1;
- a.tm_mon = 2;
- a.tm_year = 107;
- a.tm_wday = 3;
- a.tm_yday = 59;
- a.tm_isdst = 1;
- printf("%s\n",ASCTIME(&a));
- i = STRFTIME(buf,1000,"%a %b %c\n",&a);
- printf("%d %s\n",i,buf);
- i = STRFTIME(buf,10,"%a %b %c\n",&a);
- printf("%d %s\n",i,buf);
- i = STRFTIME(buf,1000,"\x22%a %A %b %B '%c' %d %H %i %j %m %M %P %S %U %w %W '%x' '%X' %y %Y %z %%\042\n",&a);
- printf("%d %s\n",i,buf);
- }