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

- We also test the strftime() %U, %W and %j format specifiers.

git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14814 87f5fb63-7c3d-0410-a384-fd976d0f7a62
This commit is contained in:
Olaf Barthel
2005-01-29 17:48:07 +00:00
parent 0b1d21471d
commit 0ae8d68e64

View File

@ -1,5 +1,5 @@
/*
* $Id: test.c,v 1.2 2005-01-25 11:21:58 obarthel Exp $
* $Id: test.c,v 1.3 2005-01-29 17:48:07 obarthel Exp $
*
* :ts=4
*/
@ -102,10 +102,15 @@ 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;