hour modification

Hello,

I need to know if there is a function to modify the hour or the time zone only for the developped application not for all the system (by setting TZ environment).

For exemple, if system hour is 11a.m I need that my application have 12a.m, without affecting other process.

Thak you in advance
I´m not sure I understand... May You explain to us what you are trying to do?(Maybe this makes it more clear)...
Hi,

I'm trying to modify the time of one application without setting the environment time or time zone.

exemple (environment time is GMT, my application time GMT + 2 )

Thank you
I'm trying to modify the time of one application without setting the environment time or time zone.

"setenv" on the TZ variable and a call to "tzset" afterwards. It should only change your applications environment setting.

But remember: Everything like this is non-standard C. Don't even think the word "platform independend". ;)


Ciao, Imi.
Thank you Imi, but a call of setenv(TZ,CET,1) will change all the environment : when I execute date command, it show me the new TimeZone.
The call of tzset will not unset this new value on the evironment, isn't it?
hm.. guess then you can prepare to roll your own timezone stuff. :-(

What libc, platform, compiler etc. are you using? Maybe ask in a more specific forum for your environment?

Ciao, Imi.
Topic archived. No new replies allowed.