Skip to content

Instantly share code, notes, and snippets.

@HotFusionMan
Created April 13, 2011 21:55
Show Gist options
  • Save HotFusionMan/918515 to your computer and use it in GitHub Desktop.
Save HotFusionMan/918515 to your computer and use it in GitHub Desktop.
After searching the Web for how to tell whether it's currently later some specified time of day, I realized it's really simple to do.
now = Time.now.to_a
if ( now[2] * 60 + now[1] ) * 60 + now[0] > START_TIME_IN_SECONDS then
# start whatever you wanted to start at this time
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment