Skip to content

Commit

Permalink
fix deadline
Browse files Browse the repository at this point in the history
  • Loading branch information
tfhuhtal committed Oct 25, 2024
1 parent 4551e8a commit f925e4f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions client/components/Generic/Homepage.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ export const PageItem = ({ title, content }) => (

export const DateItem = ({ timestamp, t }) => {
const date = new Date(timestamp)

// Check if the time is 00:00
if (date.getUTCHours() === 0 && date.getUTCMinutes() === 0) {
// Subtract one minute
date.setUTCMinutes(date.getUTCMinutes() - 1)
}

const year = date.getUTCFullYear()
const month = date.getUTCMonth() + 1 // getUTCMonth() returns 0-11
const day = date.getUTCDate()
Expand Down

0 comments on commit f925e4f

Please sign in to comment.