This is how not to write platform independent code:
version(Posix)
{
//This should be in core.stdc.time, but it isn't, so
//we're declaring it here.
extern(C)
{
extern __gshared char* tzname[2];
extern __gshared int daylight;
}
}
Breaks on FreeBSD because 'daylight' isn't defined in the standard C library.
Regards.
Comment #1 by ibuclaw — 2011-02-19T15:51:07Z
From: http://wiki.freebsd.org/FreeBSD_and_Standards
daylight broken (both in FreeBSD and in POSIX); won't fix
getdate(3) not implemented
timezone broken (both in FreeBSD and in POSIX); won't fix
tzname broken (both in FreeBSD and in POSIX); won't fix
Comment #2 by issues.dlang — 2011-02-19T18:13:45Z
You're right. It's not standard C, but it _is_ Posix. I have no clue why FreeBSD wouldn't have it implemented. See bug# 4944.
Unfortunately, I don't have a machine with FreeBSD running, we don't have an autotester with FreeBSD running, and apparently no one with FreeBSD tested std.datetime before the release.