1
0
mirror of https://github.com/adtools/clib2.git synced 2025-12-08 14:59:05 +00:00

- Updated the ".cvsignore" file.

- Moved the date/time conversion test code around in "test.c".


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14820 87f5fb63-7c3d-0410-a384-fd976d0f7a62
This commit is contained in:
Olaf Barthel
2005-01-30 10:23:26 +00:00
parent fce21e21d6
commit 49bc1d6b13

View File

@ -1,5 +1,5 @@
/*
* $Id: test.c,v 1.3 2005-01-29 17:48:07 obarthel Exp $
* $Id: test.c,v 1.4 2005-01-30 10:23:26 obarthel Exp $
*
* :ts=4
*/
@ -88,6 +88,10 @@ main(int argc,char ** argv)
strftime(time_buffer,sizeof(time_buffer),"%c",&tm);
printf("gmt = %s\n",time_buffer);
tm = (*gmtime(&now));
strftime(time_buffer,sizeof(time_buffer),"%c %U %W %j",&tm);
printf("%s\n",time_buffer);
tm.tm_year = 105;
tm.tm_mon = 0;
tm.tm_mday = 25;
@ -102,15 +106,10 @@ main(int argc,char ** argv)
strftime(time_buffer,sizeof(time_buffer),"%c",&tm);
printf("2005-01-25 12:03:53 -> local time = %s\n",time_buffer);
time(&now);
tm = (*gmtime(&now));
strftime(time_buffer,sizeof(time_buffer),"%c",&tm);
printf("2005-01-25 12:03:53 -> gmt = %s\n",time_buffer);
tm = (*gmtime(&now));
strftime(time_buffer,sizeof(time_buffer),"%c %U %W %j",&tm);
printf("%s\n",time_buffer);
#if defined(IEEE_FLOATING_POINT_SUPPORT) || defined(M68881_FLOATING_POINT_SUPPORT)
{
const double pi = 3.14159265358979323846;