File tree 2 files changed +5
-3
lines changed
2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -44,8 +44,10 @@ class Dashing.Widget extends Batman.View
44
44
45
45
@ accessor ' updatedAtMessage' , ->
46
46
if updatedAt = @ get (' updatedAt' )
47
- timestamp = updatedAt .toString ().match (/ \d * :\d * / )[0 ]
48
- " Last updated at #{ timestamp} "
47
+ timestamp = new Date (updatedAt * 1000 )
48
+ hours = timestamp .getHours ()
49
+ minutes = (" 0" + timestamp .getMinutes ()).slice (- 2 )
50
+ " Last updated at #{ hours} :#{ minutes} "
49
51
50
52
@ :: on ' ready' , ->
51
53
Dashing .Widget .fire ' ready'
Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ def production?
81
81
82
82
def send_event ( id , body )
83
83
body [ "id" ] = id
84
- body [ "updatedAt" ] = Time . now
84
+ body [ "updatedAt" ] = Time . now . to_i
85
85
event = format_event ( body . to_json )
86
86
settings . history [ id ] = event
87
87
settings . connections . each { |out | out << event }
You can’t perform that action at this time.
0 commit comments