[Issue 4944] Missing tzname even though we have tzset
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Sep 26 07:35:52 PDT 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4944
--- Comment #1 from Jonathan M Davis <jmdavisProg at gmx.com> 2010-09-26 07:35:08 PDT ---
Okay. daylight does matter. I misread the man page, thinking that it was
whether daylight savings time is in effect, but it's not - it's whether the
current timezone _has_ DST, which is definitely useful.
In any case, a declaration of
extern(C)
{
extern __gshared char* tzname[2];
extern __gshared int daylight;
}
in my code seems to do the trick, but it really should be in core.stdc.time.
Also, the int on daylight makes me moderately nervous since int's size can vary
in C/C++, but there does not appear to be a c_int declared in druntime, only
c_long, otherwise I'd use that.
Looking further in core.sys.posix.time, I see a daylight (which may be the
daylight in question) and a timezone which is a c_long (whatever that's for),
but in spite of finding daylight, I still don't see tzname anywhere.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list