//begin main function $(document).ready(function () { updateVoteTimeStamp(); }); //end main function function updateVoteTimeStamp() { var voteUpdated = new Date(); $('#nowTime').html( 'The time is:' + voteUpdated.strftime("%I:%M %P %Z")); }
<script type="text/javascript" src="http://hacks.bluesmoon.info/strftime/strftime-min.js"></script> <div id="nowTime"></div>