TZ-related changes in Draft 5 of the next POSIX standard

Chris Newman chris.newman at innosoft.com
Wed Jan 10 00:49:05 UTC 2001


--On Monday, January 8, 2001 16:31 -0800 Paul Eggert <eggert at twinsun.com> 
wrote:
> * The following declarations are added to <time.h>:
>
>   char *asctime_r(const struct tm *restrict, char *restrict);
>   char *ctime_r(const time_t *, char *);
>   struct tm *localtime_r(const time_t *restrict, struct tm *restrict);
>   struct tm *gmtime_r(const time_t *restrict, struct tm *restrict);
>   struct tm *getdate(const char *); char *strptime(const char *restrict,
>   const char *restrict,
>     struct tm *restrict);
>
>   extern int daylight;
>   extern long timezone;

A suggested clarification:

localtime_r (and friends) should always be thread safe, even if a 
non-thread-safe time function such as mktime is called in another thread.

		- Chris




More information about the tz mailing list