Skip to content
This repository has been archived by the owner on Sep 24, 2024. It is now read-only.

Commit

Permalink
hotfix adds 0 padding to timestampfixes #29
Browse files Browse the repository at this point in the history
  • Loading branch information
russbiggs committed Aug 25, 2020
1 parent 6eecd6f commit db5cbe4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ const colors = {
const outlet = feature.properties.outlet;
const createdAt = parseFloat(feature.properties.createdAt);
const d = new Date(createdAt * 1000); // python time in seconds, multiply by 1000 for milliseconds
const dateSurveyed = `${(d.getMonth()+1)}-${d.getDate()}-${d.getFullYear()} ${d.getHours()}:${d.getMinutes()}`;
const dateSurveyed = `${(d.getMonth()+1)}-${d.getDate()}-${d.getFullYear()} ${d.getHours().toString().padStart(2,'0')}:${d.getMinutes().toString().padStart(2,'0')}`;

while (Math.abs(e.lngLat.lng - coordinates[0]) > 180) {
coordinates[0] += e.lngLat.lng > coordinates[0] ? 360 : -360;
Expand Down

0 comments on commit db5cbe4

Please sign in to comment.