LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 03-19-2014, 12:06 AM   #1
ilesterg
Member
 
Registered: Jul 2012
Location: München
Distribution: Debian, CentOS/RHEL
Posts: 587

Rep: Reputation: 72
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.

Thanks!
 
Old 03-20-2014, 05:13 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
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, 06:29 PM   #3
ilesterg
Member
 
Registered: Jul 2012
Location: München
Distribution: Debian, CentOS/RHEL
Posts: 587

Original Poster
Rep: Reputation: 72
Hi,

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
Code:
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.

Cheers!
 
  


Reply

Tags
date, timezone, tz



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 06:34 PM
basic html question - download link to files on my webpage question Davno Linux - Server 5 12-25-2009 07:24 AM
Question, Apples Contribution to Open Source + MacOs file structure question Higgy3k Other *NIX 5 07-25-2005 04:23 AM
Not your regular GRUB question - just a short question for a fried MBR!! ziphem Linux - General 3 01-31-2005 01:51 PM
login prompt question & kde scheme question JustinCoyan Slackware 2 06-09-2004 02:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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

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