Returns the name of the timezone associated with the first arguement.
Berkeley compatability library (libbsd.a) (for timezone only)
#include <time.h> char *timezone(zone, dst) int zone; int dst;
#include <time.h> #include <limits.h> int zone; int dst; char czone[TZNAME_MAX+1];
The timezone subroutine returns the name of the timezone associated with the first argument which is measured in minutes westward frow Greenwich. If the environment variable TZ is set, the first argument is ignored and the current timezone is calculated from the value of TZ. If the second argument is 0, the standard name is returned otherwise the Daylight Saving Time name is returned. If TZ is not set, then the internal table is searched for a matching timezone. If the timezone does not appear in the built in table then difference from GMT is produced.
Timezone returns a pointer to static data that will be overwritten by subsequent calls.
zone | Specifies minutes westward from Greenwich. |
dst | Specifies whether to return Standard time or Daylight Savings time. |
czone | Specifies a buffer of size TZNAME_MAX+1, that the result is placed in. |
timezone returns a pointer to static data that contains the name of the timezone.
There are no errors defined.
List of Multi-threaded Programming Subroutines