The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
Google UNIX.COM


UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Unix/Neoware/Font Issues foal_11 Linux 3 10-06-2007 11:29 AM
unix environment rohitv UNIX for Dummies Questions & Answers 2 09-06-2006 08:12 PM
Sco Unix network issues tpurazi1 SCO 1 07-07-2004 07:40 AM
How Do I set up a UNix dev environment alam UNIX for Dummies Questions & Answers 1 09-13-2001 11:01 PM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1  
Old 03-15-2004
Eff Eff is offline
Registered User
 

Join Date: Mar 2004
Posts: 2
Unix environment issues

I'm having a problem with AIX 4.3.3 and I figured someone here might be able to help me.
I'm running a program 24/7 and I want to handle the day light savings issue without restarting the program since my users won't like it.
I don't have the option of setting the time for the DLS in advance, so I need to change the TZ (and basically tell the computer I'm somewhere else). Unfortunatly, once I change the TZ the application, which has already started needs to be restarted in order to get the new settings.
I'm using C and/or ada in this program and I figure there must be a way for me to request the environment setting again from within the aplication.
I'd appriciate any help I can get on this,
Eff
Reply With Quote
Forum Sponsor
  #2  
Old 03-15-2004
flim flam flamma jamma
 

Join Date: May 2001
Location: Chicago IL, USA
Posts: 1,006
unless you intend to reverse engineer the program and write your own code then recompile the application you are going to have to follow suit w/ it and restart the program.
Reply With Quote
  #3  
Old 03-15-2004
Eff Eff is offline
Registered User
 

Join Date: Mar 2004
Posts: 2
I figured as much and I was looking for a solution which might require some changes in the code. The only problem is that I haven't found out how to do that. I can save a TZ variable within the application. But this isn't the solution I was looking for. I thought there must be a way to use the TZ which is already defined in the UNIX OS.
Reply With Quote
  #4  
Old 03-15-2004
flim flam flamma jamma
 

Join Date: May 2001
Location: Chicago IL, USA
Posts: 1,006
TZ is a shell environment setting.

since the program starts it initiates the TZ variable.

in a shell account if you change the TZ variable it is not effective untill you start a new shell instance.

you would need to put in some kinda code that checks an external file for the TZ variable so you can change it on a whim.
Reply With Quote
  #5  
Old 03-15-2004
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,609
Is there more to your problem than the switch to Daylight Savings Time? That much should already work with no further effort from you. It is just a matter of setting TZ to a value that implies such a switch.

How did your cron behave over the switch, Did you need to restart cron? I'm guessing that you didn't. All of your programs should work equally well.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 02:43 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0