Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAGDMk9G0i3-wYFxLJ_vYX+p1Fxpex-icdHOzVAGX6U9wM2qTYg@mail.gmail.com>
Date: Thu, 1 May 2014 17:57:42 -0400
From: John Mudd <johnbmudd@...il.com>
To: musl <musl@...ts.openwall.com>
Subject: Re: ctime, timezone?

$ echo $TZ

$ set | grep TZ
$
I don't have $TZ set at all.

$ ls -l /etc/localtime
-rw-r--r-- 1 root root 3519 Apr 24 18:13 /etc/localtime
$


Thanks, works as expected now with $TZ set.

$ export TZ='America/New_York'
$ test_ctime
Thu May  1 17:54:29 2014
$




On Thu, May 1, 2014 at 4:37 PM, John Mudd <johnbmudd@...il.com> wrote:

> Am I doing something wrong? I expected roughly the same time when running
> the musl version.
>
>
> $ cat test_ctime.c
> #include <stdio.h>
> #include <time.h>
>
> int main()
> {
>     time_t t = time(0);
>     printf("%s", ctime(&t));
> }
> $
>
>
> $ gcc  test_ctime.c   -o test_ctime
> $ test_ctime
> Thu May  1 16:33:16 2014
> $
>
>
> $ musl-gcc -fno-stack-protector    test_ctime.c   -o test_ctime
> $ test_ctime
> Thu May  1 20:33:46 2014
> $
>

Content of type "text/html" skipped

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.