[cs631apue] About test env TZ

Yuxi Wang ywang286 at stevens.edu
Tue Oct 15 09:09:42 EDT 2019


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<mailto: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/317a949b/attachment.html>


More information about the cs631apue mailing list