time logic updated for heroku