fix php error notices and date formatting, refresh history after storing new code
Merge pull request #1 from gredin/master

fix php error notices and date formatting