Nagios Timezone
Hugo van der Kooij
hvdkooij at vanderkooij.org
Sat Jan 6 10:31:31 CET 2007
On Fri, 5 Jan 2007, Darren Dunham wrote:
>>> So how do I determine what the proper setting for my timezone is? I
>>> tried setting TZ="America/Anchorage" but this didn't have any effect.
>>
>> That is NOT a valid TZ variable. If you take a minute you can use your
>> favorite search engine and actually find the documentation on the TZ
>> variable.
>>
>> Like: http://www.gnu.org/software/libc/manual/html_node/TZ-Variable.html
>
> Do you mean that he's leaving the leading ':' off or something else?
> I've never seen that cause a problem...
Well I have seen plenty of cases where this format is not supported. It
only works if all the files are present to translate this format. (They do
not fit in embedded Linux for example.)
> # TZ=America/Anchorage date
> Fri Jan 5 14:21:33 AKST 2007
> # TZ=:America/Anchorage date
> Fri Jan 5 14:21:35 AKST 2007
By lack of the proper timezone tree you get:
$ date
Sat Jan 6 10:21:58 CET 2007
$ TZ=America/Anchorage date
Sat Jan 6 09:22:09 UTC 2007
So to be safe one does not rely on this tree and uses the explicit
definition:
TZ='CET-1CEST,M3.5.0/2,M10.5.0/3'
Also notice that unless the TZ variable is set in the one-liner containing
the call to start Nagios it may have no effect whatsoever.
$ TZ=America/Anchorage date
Sat Jan 6 00:21:33 AKST 2007
$ TZ=America/Anchorage
$ date
Sat Jan 6 10:27:35 CET 2007
Hugo.
--
hvdkooij at vanderkooij.org http://hvdkooij.xs4all.nl/
This message is using 100% recycled electrons.
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list