[cs631apue] About test env TZ

Elliot Wasem ewasem at stevens.edu
Tue Oct 15 09:12:13 EDT 2019


Hey Yuxi,

Quite frankly I forget. I suggest you write yourself a toy program really
quick and test it out!

Best,
Elliot

On Tue, Oct 15, 2019, 9:09 AM Yuxi Wang <ywang286 at stevens.edu> wrote:

> Hi Elliot,
>
>
>
> You mean set TZ first and add a line at the beginning of the program like
> tzset() and then test it?
>
> Sounds reasonable.
>
> I checked the manual it doesn’t tell me whether ctime() uses TZ or not.
> Could you tell me about that?
>
>
>
> Thanks for the help.
>
>
>
> Yuxi Wang
>
>
> ------------------------------
> *From:* cs631apue-bounces at lists.stevens.edu <
> cs631apue-bounces at lists.stevens.edu> on behalf of Elliot Wasem <
> ewasem at stevens.edu>
> *Sent:* Tuesday, October 15, 2019 9:00:35 AM
> *To:* cs631apue at lists.stevens.edu <cs631apue at lists.stevens.edu>
> *Subject:* Re: [cs631apue] About test env TZ
>
> Hey Yuxi,
>
> Check out "man 7 environ" (or is it man 7 environment?) for the format of
> the TZ variable.
>
> I think I remember using tzset() (I forget if that's man 2 or man 3) to
> set the time zone for the program.
>
> Hope that helps,
> Elliot
>
> On Tue, Oct 15, 2019, 8:57 AM Yuxi Wang <ywang286 at stevens.edu> wrote:
>
>>
>>
>> Hello professor,
>>
>>
>>
>> Could you tell me how to test my program with TZ?
>>
>> Just set the env using export TZ=GMT?
>>
>>
>>
>> Actually I use ctime(3) to get the time. Does it use TZ inside of it?
>>
>>
>>
>> Thank you
>>
>>
>>
>> Yuxi Wang
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.stevens.edu/pipermail/cs631apue/attachments/20191015/8ee8ee9b/attachment-0001.html>


More information about the cs631apue mailing list