This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Seg Fault in strftime
- From: Michael Enright <mike at kmcardiff dot com>
- To: cygwin at cygwin dot com
- Date: Fri, 31 Jul 2015 16:43:49 -0700
- Subject: Re: Seg Fault in strftime
- Authentication-results: sourceware.org; auth=none
- References: <CAOC2fq9A1DSjy=7Af=wVCkNEsttpd4Fj-0w_nNwnSb76WFt5WA at mail dot gmail dot com> <55BB6F59 dot 8060905 at dronecode dot org dot uk> <CAOC2fq-MjJb3HuKHs5cuDMRAMxabXGQKW6heUsmyVbnnWWMXAA at mail dot gmail dot com>
On Fri, Jul 31, 2015 at 12:50 PM, Michael Enright wrote:
> If I do
> struct tm zeroed = {0};
> manually_initialized.tm_year = 2000;
> strftime(buf, buf_size, "%Z", &zero_initialized);
> The printed time zone is PST (TZ happens to be "America/Los_Angeles")
>
Apologies, I actually did this consistently but the report above is wrong.
> struct tm zeroed = {0};
> zeroed.tm_year = 2000;
> strftime(buf, buf_size, "%Z", &zeroed);
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple