Fix epoch date calculation on Windows