mirror of
https://github.com/adtools/clib2.git
synced 2025-12-08 14:59:05 +00:00
- For %C strtime() should return the century number, not the
year number mod 100. git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14955 87f5fb63-7c3d-0410-a384-fd976d0f7a62
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: time_strftime.c,v 1.15 2005-05-14 14:47:46 obarthel Exp $
|
||||
* $Id: time_strftime.c,v 1.16 2005-05-19 13:57:52 obarthel Exp $
|
||||
*
|
||||
* :ts=4
|
||||
*
|
||||
@ -239,10 +239,10 @@ format_date(const char *format,const struct tm *tm,struct Hook * hook)
|
||||
format_date("%a %b %d %H:%M:%S %Y",tm,hook);
|
||||
break;
|
||||
|
||||
/* The last two digits of a year ("00"; C99). */
|
||||
/* The century number ("00"-"99"; C99). */
|
||||
case 'C':
|
||||
|
||||
__number_to_string((unsigned int)(tm->tm_year % 100),buffer,sizeof(buffer),2);
|
||||
__number_to_string((unsigned int)(tm->tm_year / 100),buffer,sizeof(buffer),2);
|
||||
store_string_via_hook(buffer,2,hook);
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user