in reply to Re^2: efficient determination of in/out of hours
in thread efficient determination of in/out of hours including Bank Holidays
That's mathematically the same. (If 86400 were a power of 2, the most efficient way 'd be >> and <<.) However time and mktime refer to different timezones. Unless you happen to be in Iceland, there are some hours when this works wrong...
Update: I posted this while you updated your post :-)
I'm not at my computer, but perhaps something like mktime(gmtime) for determining today's midnight could work...