Fix date formatting for BSD

and os x :)
Merge pull request #45 from pitr-ch/story/foreign-keys

Fix date formatting for BSD