diff --git a/app/static/assets/leaflet/utils.js b/app/static/assets/leaflet/utils.js
index 2baab25..438d1ec 100644
--- a/app/static/assets/leaflet/utils.js
+++ b/app/static/assets/leaflet/utils.js
@@ -67,13 +67,17 @@ function addPlayerMarker(map, player, icon=bluePlayerIcon){
player['latitude'],
player['longitude']
], {icon: icon}).addTo(map);
- var timestamp_utc = moment.utc(player['timestamp_utc']).toDate()
- var timestamp_local = moment(timestamp_utc).local().format('YYYY-MM-DD HH:mm');
+ var timestamp_local = toMomentLocal(player['timestamp_utc']).format('YYYY-MM-DD HH:mm')
playerMarker.bindTooltip(`${player['username']}
${timestamp_local}`).openPopup();
return playerMarker
}
+function toMomentLocal(timestamp_utc_string){
+ var timestamp_utc = moment.utc(timestamp_utc_string).toDate()
+ return moment(timestamp_utc).local()
+}
+
var myLocationMarker
function updateMyLocation(position){
if(myLocationMarker == undefined){
diff --git a/app/templates/game_hunter_dashboard.html b/app/templates/game_hunter_dashboard.html
index 24c53ac..4b15e2a 100644
--- a/app/templates/game_hunter_dashboard.html
+++ b/app/templates/game_hunter_dashboard.html
@@ -36,12 +36,16 @@
{{ bunny.player_caught_by_players | selectattr('catching_player', '==', player) | selectattr('review.name', '==', 'none') |list|length}}
-
+ {% with location = bunny.last_location(offset=hunter_delay) %} + {% if location %}{{ moment(location.timestamp).fromNow()}} + {% else %} + {{ location }} + {% endif %} + {% endwith %} +
++ {% with location = player.last_location() %} + {% if location %}{{ moment(location.timestamp).fromNow()}} + {% else %} + {{ location }} + {% endif %} + {% endwith %} +
+