timezone
Package: WA2L/edrc 1.5.57
Section: Library Commands (3)
Updated: 29 June 2010
Index
Return to Main Contents
NAME
timezone - return the timezone
SYNOPSIS
edrc/lib/timezone
[
-h
|
-v
]
timezone
AVAILABILITY
WA2L/edrc
DESCRIPTION
return the timezone as defined system wide, set in the
$TZ
environment variable or set in the configuration file
timezone.cfg.
This command is used to return the time zone using a cross
operating system compatible interface, due to the fact that on
many unix flavors the setting of the time zone is implemented
differently.
The following pseudo code explains the precise resolution of
the return value of
timezone
(
TIMEZONE
and
TIMEZONE_DEFAULT
are settings in the
timezone.cfg
file):
if TIMEZONE <> "" then
return TIMEZONE
else
if $TZ <> "" then
return $TZ
else
if 'system wide time zone setting' <> "" then
return 'system wide time zone'
else
if TIMEZONE_DEFAULT <> "" then
return TIMEZONE_DEFAULT
else
return "GMT"
endif
endif
endif
endif
See also
timezone.cfg(4)
for the description of the possible settings and the
influence to the
timezone
return value.
OPTIONS
- -h
-
print usage message.
- -v
-
print verbose information.
ENVIRONMENT
- $TZ
-
Timezone environment variable setting.
EXIT STATUS
- 0
-
no error.
- 4
-
usage message printed.
- 6
-
config file does not exist.
FILES
- /etc/TIMEZONE
-
system wide time zone setting on Solaris. This file must contain
the entry
TZ=a_timezone
.
- /etc/default/tz
-
time zone setting on HPUX. This file must contain a single line
specifying the time zone entry
a_timezone.
- /etc/localtime
-
On Linux
/etc/localtime
defines the time zone. Normally this file is a symbolic link to
the real time zone file in
/usr/share/zoneinfo.
- /etc/default/tz
-
time zone setting on all other operating systems. This file must
contain a single line specifying the time zone entry
a_timezone.
- edrc/etc/timezone.cfg
-
config file for
timezone.
- edrc/etc/timezone.dat
-
timezone map file
timezone
on Linux.
EXAMPLES
-
SEE ALSO
edrcintro(1),
timezone.cfg(4),
timezone.dat(4),
TIMEZONE(4)
NOTES
The
timezone
command is used internally in many WA2L/edrc commands to ensure a
consistent output of all dates within the whole package.
BUGS
-
AUTHOR
timezone was developed by Christian Walther. Send suggestions
and bug reports to wa2l@users.sourceforge.net .
COPYRIGHT
Copyright © 2009
Christian Walther
This is free software; see
edrc/doc/COPYING
for copying conditions. There is ABSOLUTELY NO WARRANTY; not
even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
This document was created by man2html
using the manual pages.
Time: 16:54:42 GMT, August 28, 2024