Skip to content
Permalink
Browse files

Ensure correct timestamps for WEBrick output

  • Loading branch information...
jodosha committed Feb 17, 2015
1 parent 0877c76 commit 5df2091d9f4d378ad90993c0285bc1d3bef04f4b
Showing with 2 additions and 5 deletions.
  1. +1 −0 source/_footer.erb
  2. +1 −5 source/javascripts/main.js
@@ -39,6 +39,7 @@

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="javascripts/vendor/jquery-1.11.2.min.js"><\/script>')</script>
<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.9.0/moment.min.js"></script>

<%= javascript_include_tag 'application' %>

@@ -49,11 +49,7 @@ $(window).load(function(){

// Prepare timestamps for terminal animation
$(window).load(function(){
var date = new Date();
var month = (date.getMonth()+1);
month = month > 10 ? month : '0'+month;

var timestamp = "["+date.getFullYear()+"-"+month+"-"+date.getDate()+" "+date.getHours()+":"+date.getMinutes()+":"+date.getSeconds()+"]";
var timestamp = "[" + moment().format("YYYY-MM-DD HH:mm:ss") + "]";

$('span.timestamp').each(function(i, element) {
element = $(element);

0 comments on commit 5df2091

Please sign in to comment.
You can’t perform that action at this time.