Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 03-19-2014, 01:06 AM   #1
Registered: Jul 2012
Distribution: Arch, Debian, and CentOS/RHEL
Posts: 543

Rep: Reputation: 56
TZ value question

Hi all,

Can you please help me understand the meaning of the following?

export TZ=CET0EDT

I have an ongoing investigation where a script echoes the date, but there is some kind of inconsistency since the value in the date is correct, but the lable is EDT for some reason. Can this be the cause of that? I saw the code in the .profile of the user.

Old 03-20-2014, 06:13 PM   #2
Registered: May 2001
Posts: 29,361
Blog Entries: 55

Rep: Reputation: 3548Reputation: 3548Reputation: 3548Reputation: 3548Reputation: 3548Reputation: 3548Reputation: 3548Reputation: 3548Reputation: 3548Reputation: 3548Reputation: 3548
Please don't mark threads "solved" if they aren't. Date reads /etc/localtime and a user shouldn't (need to) specify TZ unless a value different than local time is required. I actually never encountered a "${TZ0}0${TZ1}" setting nor do I have an idea why that would work or be required?..
Post the script and its output?
Old 03-20-2014, 07:29 PM   #3
Registered: Jul 2012
Distribution: Arch, Debian, and CentOS/RHEL
Posts: 543

Original Poster
Rep: Reputation: 56

Thanks. It turns out the script makes use of its own TZ value to be displayed in its output instead of the system/local time. I don't see why it's required either. I just played with TZ in a command line and saw this
awesomeuserserver:awesomeuser /home/awesomeuser>export TZ=CET0EDT 
awesomeuserserver:awesomeuser /home/awesomeuser>date 
Thu Mar 20 00:17:45 EDT 2014 
awesomeuserserver:awesomeuser /home/awesomeuser>export TZ=CET0CET 
awesomeuserserver:awesomeuser /home/awesomeuser>date 
Thu Mar 20 00:17:55 CET 2014 
awesomeuserserver:awesomeuser /home/awesomeuser>export TZ=CET0MMM
awesomeuserserver:awesomeuser /home/awesomeuser>date 
Thu Mar 20 00:18:02 MMM 2014 
awesomeuserserver:awesomeuser /home/awesomeuser>unset tz
awesomeuserserver:awesomeuser /home/awesomeuser>
I made a lazy conclusion that the part after 0 would translate to the label and the one before 0 is the actual date.



date, timezone, tz

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] GPL question (Version 2, June 1991) - physical media availability question LicenseQuestions Linux - Newbie 1 12-01-2012 07:34 PM
basic html question - download link to files on my webpage question Davno Linux - Server 5 12-25-2009 08:24 AM
Question, Apples Contribution to Open Source + MacOs file structure question Higgy3k Other *NIX 5 07-25-2005 05:23 AM
Not your regular GRUB question - just a short question for a fried MBR!! ziphem Linux - General 3 01-31-2005 02:51 PM
login prompt question & kde scheme question JustinCoyan Slackware 2 06-09-2004 03:02 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:51 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration