I have buttons with the names of big cities. Clicking them, I want to get local time in them.
$(\'#btnToronto\').click(function () { var hours = ne
You can use like this,
var dt = new Date(); var h = dt.getHours(), m = dt.getMinutes(); var _time = (h > 12) ? (h-12 + ':' + m +' PM') : (h + ':' + m +' AM');
Hopes this will be better with minutes too.