Fixed epoch2date so it works on Mac