src/helpers/api.js
// Add in timestamp to each entity:
Add in timestamp to each entity.
Add in timestamp to each entity .
function parseFeed(apiResponse) {
  const timestamp = parseInt(apiResponse.header.timestamp);
  const syncDate = LocalTime.fromCurrentTime();
  const timestampDate = LocalTime.fromTimestamp(timestamp);
  const tripEntities = apiResponse.entity.map(i => {
    i.timestamp = timestamp;
    return i;
  });
  return tripEntities;
}
function parseFeed ( apiResponse ) { const timestamp = parseInt ( apiResponse . header . timestamp ) ; const syncDate = LocalTime . fromCurrentTime ( ) ; const timestampDate = LocalTime . fromTimestamp ( timestamp ) ; const tripEntities = apiResponse . entity . map ( i => { i . timestamp = timestamp ; return i ; } ) ; return tripEntities ; }
Add in timestamp to each entity:
Add in timestamp to each entity :
//console.log(`Syncing! at ${syncDate.printTime()} and API thinks it's ${timestampDate.printTime()}`)