haskell / time

A time library

Home Page:http://hackage.haskell.org/package/time

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

test-unix fails on FreeBSD and MacOS

Bodigrim opened this issue · comments

The test-unix suite tests two things: that formatTime works correctly, using GNU strftime as a reference, and that getTimeZone respects the TZ environment variable. These things don't exist on Windows, which is why they're in a separate suite.

It looks like the failures are caused by strftime behaving differently on BSD (and MacOS) than on GNU. Probably the simplest thing to do would be to not run the formatTime tests on non-GNU platforms.

Yeah, it seems to be because of Glibc extensions (see https://man7.org/linux/man-pages/man3/strftime.3.html#NOTES) unsupported by BSD platforms.

(BTW I can raise a PR with these GitHub Actions, if you wish, or feel free to cherry-pick them yourself)

Sure, make a PR for the GH Actions. Thanks!

Fixed!