time zones


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers time zones
# 1  
Old 10-16-2001
Power time zones

Hi all, this is my first post so I hope someone can help me. I am currently putting code into a script that is run through the cron on a unix box where the date/time is set to EDT or Eastern Daylight Time but I am in Central Standard time. The program I am adding code to runs every hour and I put some code in it to create a file with a date stamp on the end of it. Well the program is supposed to create a new file every day and when the day rolls over at (supposedly) midnight but midnight is not really midnight so I need a way to run a date command and pulls back the date in CST rather than EDT and I can't change the TZ environmental variable. I need to try to do this in the date command but I'm kinda stumped anybody help me with some syntax to retrieve the date in CST time and not do any calculations on the date variable with anything because I don't want to have to worry about maintaining this program if the crazy sys admin decides to change the system date back to CST??????????
# 2  
Old 10-17-2001
There is no sensible reason to prohibit you from fiddling with the TZ variable. You inherit a copy of your parent's TZ variable, but if you change yours, no one else's will change. You can also spawn a child with a different value than yours if you want like this:
TZ=CST4CDT date
This works with bourne and korn shells, the c-shell doesn't allow it. But even there you can save the old value, change it, run date, and change it back.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

5 More Discussions You Might Find Interesting

1. Solaris

showing 2 different time zones in global zone and nonglobal zone

can some one help me out as it is showing 2 different time zones in global zone and nonglobal zone .In global zone it is showing in GMT while in nonglobal zone i it showing as PDT. System in running with solaris 10 (3 Replies)
Discussion started by: ravijanjanam12
3 Replies

2. Solaris

need help::solaris zones in real time..

Hi frnds... I just had interview with a client , question :: how do you implement solaris zones in real time. please can anyone give me stepbystep process of zones.... i know its there in sol10 pdf but i want short explantion which i can use to answer an interviewer... THANKS IN... (0 Replies)
Discussion started by: yrajendergoud
0 Replies

3. Solaris

Enabling time service in local zones

Hi, Is it possible to enable the time service in local zones? E.g. erahmanz1% svcs -a | grep -i time STATE STIME FMRI disabled Sep_10 svc:/network/daytime:dgram disabled Sep_10 svc:/network/daytime:stream disabled Sep_10 svc:/network/time:dgram... (2 Replies)
Discussion started by: ERahman
2 Replies

4. Solaris

Zones

Hi Everyone, How to create a loopback filesystem in a running non golbalzone? and how to share a diskgroup in veritas ? Thanks & Regards Padmaja (1 Reply)
Discussion started by: padmaja
1 Replies

5. UNIX for Advanced & Expert Users

ntp across time zones

I've been tasked to implement ntp on my SCO Unix servers. I have over 600 servers spread across the US in different time zones. Each remote server has network connectivity to a main server here, through their local ISP. (That's how we currently deliver mail to them). My question is, how can... (5 Replies)
Discussion started by: Howeird
5 Replies
Login or Register to Ask a Question