bugfixes

date() replaced with time()
fixed check for the "end now" button