diff --git a/src/modules/WeatherRequest.js b/src/modules/WeatherRequest.js index ccedfbd..7cb2b5b 100644 --- a/src/modules/WeatherRequest.js +++ b/src/modules/WeatherRequest.js @@ -84,7 +84,7 @@ function WeatherRequest(req) { this.setTimeZone = () => { return timezone({ - key: process.env.GOOGLE_API_KEY, + // key: process.env.GOOGLE_API_KEY, location: req.params.latitude + ',' + req.params.longitude, }) .then(res => { diff --git a/views/pages/index.ejs b/views/pages/index.ejs index 963d27e..f683806 100644 --- a/views/pages/index.ejs +++ b/views/pages/index.ejs @@ -19,7 +19,7 @@

- Now (updated: <%= moment.unix(currently.time).format(params.hoursFormat + ':mm')%><% if (params.hoursFormat === 'h') { %><%= moment.unix(currently.time).format('a') %><% } %>)

+ Now (updated: <%= moment.unix(currently.time).fromNow()%>)
<%= Math.round(currently.temperature) %>º<%= params.scale %> <%# This only shows the image if it's IE9 and above %> diff --git a/views/partials/hourly.ejs b/views/partials/hourly.ejs index 1849e21..be5fb83 100644 --- a/views/partials/hourly.ejs +++ b/views/partials/hourly.ejs @@ -28,7 +28,7 @@ %>
  • - <%= data.hourly[i].startTime ? moment.unix(data.hourly[i].startTime).format(params.hoursFormat + (params.hoursFormat === 'H' ? ':mm' : '')) + '-' : '' %><%= hourlyTime.format(params.hoursFormat + (params.hoursFormat === 'H' ? ':mm' : ''))%><% if (params.hoursFormat === 'h') { %><%= hourlyTime.format('a') %> + <%= data.hourly[i].startTime ? moment.unix(data.hourly[i].startTime).fromNow() + ' and ' : '' %><%= hourlyTime.fromNow()%><% if (params.hoursFormat === 'h') { %> <% } %> <%= Math.round(data.hourly[i].temperature) %>º diff --git a/views/partials/today.ejs b/views/partials/today.ejs index 54ee419..5e741e6 100644 --- a/views/partials/today.ejs +++ b/views/partials/today.ejs @@ -16,9 +16,9 @@

    High <%= Math.round(data.daily.apparentTemperatureMax) %>° - at <%= moment.unix(data.daily.apparentTemperatureMaxTime).format(params.hoursFormat + ':mm')%><% if (params.hoursFormat === 'h') { %><%= moment.unix(data.daily.apparentTemperatureMaxTime).format('a') %><% } %> + at <%= moment.unix(data.daily.apparentTemperatureMaxTime).fromNow()%> Low <%= Math.round(data.daily.apparentTemperatureMin) %>° - at <%= moment.unix(data.daily.apparentTemperatureMinTime).format(params.hoursFormat + ':mm')%><% if (params.hoursFormat === 'h') { %><%= moment.unix(data.daily.apparentTemperatureMinTime).format('a') %><% } %> + at <%= moment.unix(data.daily.apparentTemperatureMinTime).fromNow()%>