Yes that is close enough for an starting point, thank you. I need $timezone to hold the time zone in this format -00:00 The command date +%z will give it as -0000
I know nothing about writing perl scripts. Can somebody show me how to add the : in the output of the date command in the simple following script? The cat statement is just so I can see results are correct. #!/usr/bin/perl $timezone=date +%z; cat $timezone -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Erik Trulsson Sent: Friday, April 16, 2004 1:01 AM To: JJB Cc: Greg 'groggy' Lehey; [EMAIL PROTECTED] ORG Subject: Re: timezone command On Fri, Apr 16, 2004 at 12:28:58AM -0400, JJB wrote: > I know how to set timezone, date and time. > > I am looking for command to display on the console screen the > systems timezone in this kind of format "-00:00" > > Is there such an command or some way to get this info? > > In an perl script I tried $timezone= $ENV{TZ} and I did not get > 00:00 format which I was looking for. Try 'date +%z' to get the timezone in the format "+0200". Not exactly what you asked for, but almost. -- <Insert your favourite quote here.> Erik Trulsson [EMAIL PROTECTED] _______________________________________________ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]" _______________________________________________ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
