mirror of
https://github.com/adtools/clib2.git
synced 2026-09-30 13:06:11 +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:
@@ -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
|
* :ts=4
|
||||||
*/
|
*/
|
||||||
@@ -102,10 +102,15 @@ main(int argc,char ** argv)
|
|||||||
strftime(time_buffer,sizeof(time_buffer),"%c",&tm);
|
strftime(time_buffer,sizeof(time_buffer),"%c",&tm);
|
||||||
printf("2005-01-25 12:03:53 -> local time = %s\n",time_buffer);
|
printf("2005-01-25 12:03:53 -> local time = %s\n",time_buffer);
|
||||||
|
|
||||||
|
time(&now);
|
||||||
tm = (*gmtime(&now));
|
tm = (*gmtime(&now));
|
||||||
strftime(time_buffer,sizeof(time_buffer),"%c",&tm);
|
strftime(time_buffer,sizeof(time_buffer),"%c",&tm);
|
||||||
printf("2005-01-25 12:03:53 -> gmt = %s\n",time_buffer);
|
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)
|
#if defined(IEEE_FLOATING_POINT_SUPPORT) || defined(M68881_FLOATING_POINT_SUPPORT)
|
||||||
{
|
{
|
||||||
const double pi = 3.14159265358979323846;
|
const double pi = 3.14159265358979323846;
|
||||||
|
|||||||
Reference in New Issue
Block a user