Update handler.js

Reintroduced and fixed the 12-hour clock