Nagios Timezone

Hugo van der Kooij hvdkooij at vanderkooij.org
Mon Jan 8 19:56:36 CET 2007


On Mon, 8 Jan 2007, Darren Dunham wrote:

>> 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
>
> All the one above does is set a shell variable.  Just like any other
> environment variable you really need to make sure it's exported before
> trying to use it.
>
> $ TZ=America/Anchorage
> $ date           # TZ not exported yet
> Mon Jan  8 07:48:52 PST 2007
> $ export TZ      # Now it's visible in the environment
> $ date
> Mon Jan  8 06:48:57 AKST 2007

I know that. But exporting a variable means it will be there for any 
follow-up command as well. And there are some cases where that is not what 
one wants.

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