- How do I use ruby time class to always get the EST
- $j(document).ready(function() {
- refresh();
- function refresh() {
- $j.getJSON("/timer", function(data) {
- console.log(data);
- });
- setTimeout(refresh, 3000);
- }
- });
- def refresh_timer
- respond_to do |format|
- format.json { render :json => Time.now}
- end
- end