The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Yesterday in i.e. May 09 and 05/09 format Daniel Gate Shell Programming and Scripting 3 05-20-2008 04:59 PM
get yesterday in yyyymmdd format aaron_fong Shell Programming and Scripting 13 03-14-2008 03:14 PM
yesterday Tlg13team Shell Programming and Scripting 0 02-27-2008 04:02 AM
How to show yesterday date wind_n_cloud Shell Programming and Scripting 1 02-16-2005 10:51 PM
get yesterday date in yyyymmdd format hk_newbie UNIX for Dummies Questions & Answers 2 12-14-2001 03:32 PM

Reply
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 04-26-2004
tdavis0418 tdavis0418 is offline
Registered User
  
 

Join Date: Jan 2004
Posts: 3
Here is how I get yesterdays date


DATE_STAMP=`TZ=CST+24 date +%y%m%d`
  #2 (permalink)  
Old 09-20-2006
decci_7 decci_7 is offline
Registered User
  
 

Join Date: Sep 2006
Posts: 17
What does CST stands for?

Quote:
Originally Posted by tdavis0418
Here is how I get yesterdays date


DATE_STAMP=`TZ=CST+24 date +%y%m%d`
This works but can you please tell for what we use "TZ" and "CST"???
  #3 (permalink)  
Old 09-21-2006
Yogesh Sawant's Avatar
Yogesh Sawant Yogesh Sawant is offline Forum Staff  
Part Time Moderator and Full Time Dad
  
 

Join Date: Sep 2006
Location: Rossem, Tazenda
Posts: 1,086
The 'TZ' parameter permits overriding the default time zone. 'CST' is the name of a timezone.
  #4 (permalink)  
Old 09-21-2006
aigles's Avatar
aigles aigles is offline Forum Advisor  
Registered User
  
 

Join Date: Apr 2004
Location: Bordeaux, France
Posts: 1,418
Read the FAQ Yesterdays Date/Date Arithmetic

Jean-Pierre.
  #5 (permalink)  
Old 09-22-2006
bishweshwar bishweshwar is offline
Registered User
  
 

Join Date: Sep 2006
Posts: 56
which time zone it refers to

So CST+24 and then the date command.....

so how does the time zone gets set.......
  #6 (permalink)  
Old 10-09-2006
clemeot clemeot is offline
Registered User
  
 

Join Date: Jul 2001
Location: Malaysia
Posts: 21
I have a Q. what is the difference between CST & PST?

TZ=CST+24 date %d
TZ=PST+24 date %d

if I want to get the "day" of a date, instead of using `datecalc -D {date}`, any other options?
  #7 (permalink)  
Old 06-24-2009
jimgettman jimgettman is offline
Registered User
  
 

Join Date: Jun 2009
Posts: 1
Thumbs up TZ is the Time Zone Shell Parameter

The clever shell scripter is using an undocumented feature of the time zone command. It worked for +48 and -168 when I tested, but adding a semicolon to end the command ruins it. The CST is "Central Standard Time".
Reply

Bookmarks

Tags
solaris

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 03:13 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0