summaryrefslogtreecommitdiffstats
path: root/newlib/libc/time/strftime.c
Commit message (Collapse)AuthorAgeFilesLines
* 2005-02-25 Eric Blake <ebb9@byu.net>Jeff Johnston2005-02-251-7/+9
| | | | | | | | | | | * libc/include/time.h (__tzrule_struct): Make offset long, since a 16-bit int overflows on a 12-hour offset. * libc/sys/linux/include/time.h: Ditto. * libc/time/mktime.c (mktime): Use new type of __tzrule.offset. * libc/time/mktm_r.c: Ditto. * libc/time/gettzinfo.c: Ditto. * libc/time/strftime.c (strftime): Fix '%x' to deal with negative years. Fix '%z' to use long, not int.
* Fix minor typoJoshua Daniel Franklin2005-02-241-3/+3
|
* 2005-02-23 Jeff Johnston <jjohnstn@redhat.com>Jeff Johnston2005-02-231-1/+2
| | | | | | | | | | | | | | | | | | * libc/include/time.h [!CYGWIN](_timezone): Change to long. (__tzrule_type, __tzinfo_type): New types. (__gettzinfo): New function. * libc/sys/linux/include/time.h: Ditto. * libc/time/Makefile.am: Add gettzinfo.c. * libc/time/Makefile.in: Regenerated. * libc/time/local.h: Moved __tzrule_type to time.h. * libc/time/mktime.c: Call __gettzinfo to reference __tznorth, __tzyear, and __tzrule array. * libc/time/mktm_r.c: Ditto. * libc/time/strftime.c: Ditto. * libc/time/tzset_r.c: Ditto. Also remove definition of __tzrule which is now in gettzinfo.c. Change _timezone references to not cast to time_t. * libc/time/gettzinfo.c: New file.
* 2005-02-16 Eric Blake <ebb9@byu.net>Jeff Johnston2005-02-161-165/+416
| | | | | | | | | | | | * libc/time/time.tex: Improve the documentation. * libc/time/strftime.c: Improve the documentation. (iso_year_adjust): New helper function. (strftime): Simplify '%E' and '%O'. Change '%c' to use recursion. Fix '%C', '%y', and '%Y' to deal with years with more than 4 characters. Combine '%d' and '%e'. Implement '%D', '%F', '%g', '%G', '%n', '%R', '%t', '%T', '%u', '%V', '%X', and '%z'. Avoid core dumps on valid inputs (maxsize == 0, or tim_p->tm_isdst > 1).
* 2005-01-20 Jeff Johnston <jjohnstn@redhat.com>Jeff Johnston2005-01-201-17/+96
| | | | | | | * libc/time/strftime.c (strftime): Change %r and %x to be compliant to POSIX standard for "C" locale. Allow %E and %O modifiers to be ignored as long as they precede valid specifiers according to POSIX.
* * libc/time/strftime.c (strftime): Add '%h' and '%l, %k' GNU extensions.Christopher Faylor2003-01-151-2/+5
|
* * libc/time/strftime.c (strftime): Add %e format specifier.Corinna Vinschen2002-06-211-0/+13
|
* 2002-04-17 Jeff Johnston <jjohnstn@redhat.com>Jeff Johnston2002-04-171-3/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | * libc/include/time.h (tzset, _tzset_r): Added prototypes. (strptime): Moved prototype to be within !__STRICT_ANSI__. (_tzname, _daylight, _timezone): No long __CYGWIN__ only. (tzname): Defined for all platforms. (daylight, timezone): Defined only for CYGWIN. * libc/sys/linux/machine/i386/crt0.c: Add call to tzset() after environment set up. * libc/stdlib/setenv_r.c (_setenv_r): Call tzset() if the TZ environment variable is set. * libc/time/Makefile.am: Add support for tzset.c, tzlock.c, and tzset_r.c. * libc/time/Makefile.in: Regenerated. * libc/time/gmtime.c (gmtime): Changed to call gmtime_r. * libc/time/gmtime_r.c (gmtime_r): Changed to call _mktm_r. * libc/time/lcltime_r.c (lcltime_r): Ditto. * libc/time/local.h: New local header file. * libc/time/mktime.c (mktime): Add timezone support. * libc/time/mktm_r.c: New file which is the common engine for gmtime_r and lcltime_r. This code has timezone support. * libc/time/strftime.c (strftime): Add %Z timezone support. * libc/time/tzlock.c: New file containing timezone lock stubs. * libc/time/tzset.c: New file containing tzset() routine. * libc/time/tzset_r.c: New file containing _tzset_r and internal routine for calculating timezone changes for specified year.
* Thu Sep 13 08:49:49 2001 Jason Tishler <jason@tishler.net>Jeff Johnston2001-09-131-2/+3
| | | | | * strftime.c (strftime): Fix "%W" implementation to properly handle Mondays too.
* import newlib-2000-02-17 snapshotChristopher Faylor2000-02-171-0/+444