Skip to content

Commit

Permalink
use moment timezone
Browse files Browse the repository at this point in the history
  • Loading branch information
lluisd committed May 21, 2024
1 parent 3dbe3e3 commit 219b757
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const randomLinks = require("./config/randomLinks.json");
const TempsDeFlorsService = require('./services/tempsDeFlors')
const TwitchService = require("./services/twitch");
const ScreenshotService = require("./services/screenshot");
const moment = require('moment')
const moment = require('moment-timezone')

mongoose.connect(config.database).then(() => {
const messenger = new Messenger()
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"mathjs": "^12.4.1",
"moment": "^2.30.1",
"moment-precise-range-plugin": "^1.3.0",
"moment-timezone": "^0.5.45",
"mongoose": "^8.3.1",
"nanoid": "3.3.7",
"node-cron": "^3.0.3",
Expand Down
2 changes: 1 addition & 1 deletion views/pages/stream.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<h5><p><em><%= title %></em></p></h5>
<div id="lightgallery">
<% screenshots.forEach(function(screenshot) { %>
<a href="<%= url + '/img/' + screenshot.name %>" data-sub-html="<h4>Captura de - <%= screenshot.capturedBy %></h4> <p class='capitalize' > Fecha - <%= moment(screenshot.created).locale('es').format('LLLL') %></p>" data-lg-size="1340-754" data-slide-name="<%= screenshot.name %>">
<a href="<%= url + '/img/' + screenshot.name %>" data-sub-html="<h4>Captura de - <%= screenshot.capturedBy %></h4> <p class='capitalize' > Fecha - <%= moment(screenshot.created).tz('Europe/Madrid').locale('es').format('LLLL') %></p>" data-lg-size="1340-754" data-slide-name="<%= screenshot.name %>">
<img src="<%= url + '/img/t_' + screenshot.name %>" alt="<%= screenshot.name %>" width="200" >
</a>
<% }); %>
Expand Down

0 comments on commit 219b757

Please sign in to comment.