How to change my homepage based on the time of day?
Consider using the Rules module to set the appropriate node as your frontpage.

Based on the sample in the question, I'm assuming that node/4 is what the value is of site_frontpage. Here is the actual rule to be created that could work in your case:


Create a new rule
Event = Content is viewed
Condition: data comparison -> node:nid equals 4
Add an extra condition to check if current time is between 7pm and 8am.
Action: page redirect to node/5


For anybody not familiar (enough/yet) with Rules, checkout the 32 (!!!) great (+ free) video tutorials Learn the Rules framework. Possibly also the similar set of 8 video tutorials about the Flag module, often considered as a natural complement to the Rules module. Maybe also review the set of 30 video tutorials about the Views module ... Familiarity with only those 3 modules (Views, Rules and Flag) can get you pretty far in mostly any Drupal site (as a site builder).