in reply to odd or even day?

Take care with this because time/(24*60*60)%2 needn't switch at midnight, but some other time of the day.