Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/components/mui/EventCard/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ const EventCard = ({ event = {}, onClick, sx }) => {
year: 'numeric',
hour: '2-digit',
minute: '2-digit',
hour12: true
hour12: true,
timeZone: 'Asia/Kolkata'
}).format(new Date(event_date))
: null

Expand Down
2 changes: 1 addition & 1 deletion src/configs/themeConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const themeConfig = {

// ** Event Platform
maxFileUploadMB: 10,
defaultTimezone: 'UTC',
defaultTimezone: 'Asia/Kolkata',

Copilot AI Apr 2, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

defaultTimezone is only defined here; a repo-wide search shows no other references. Consider either wiring date/time formatting to read from this config (to avoid hardcoding 'Asia/Kolkata' in multiple places) or removing it to prevent an unused setting from becoming misleading over time.

Suggested change
defaultTimezone: 'Asia/Kolkata',

Copilot uses AI. Check for mistakes.
dateFormat: 'MMM DD, YYYY',
timeFormat: 'hh:mm A'
}
Expand Down
6 changes: 4 additions & 2 deletions src/services/email-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,17 @@ function fmtDate(iso) {
if (!iso) return 'TBA'

return new Date(iso).toLocaleDateString('en-IN', {
weekday: 'long', day: 'numeric', month: 'long', year: 'numeric'
weekday: 'long', day: 'numeric', month: 'long', year: 'numeric',
timeZone: 'Asia/Kolkata'
})
}

function fmtTime(iso) {
if (!iso) return ''

return new Date(iso).toLocaleTimeString('en-IN', {
hour: 'numeric', minute: '2-digit', hour12: true
hour: 'numeric', minute: '2-digit', hour12: true,
timeZone: 'Asia/Kolkata'
})
}

Expand Down
6 changes: 4 additions & 2 deletions src/views/events/EventDetailView.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ function formatDate(iso) {
weekday: 'long',
day: 'numeric',
month: 'long',
year: 'numeric'
year: 'numeric',
timeZone: 'Asia/Kolkata'
})
}

Expand All @@ -41,7 +42,8 @@ function formatTime(iso) {
return new Date(iso).toLocaleTimeString('en-IN', {
hour: '2-digit',
minute: '2-digit',
hour12: true
hour12: true,
timeZone: 'Asia/Kolkata'
})
}

Expand Down
10 changes: 6 additions & 4 deletions src/views/events/EventsPageView.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,11 @@ const EVENTS_PER_PAGE = 6
function parseEventDate(iso) {
if (!iso) return { full: '' }
const d = new Date(iso)
const weekday = d.toLocaleDateString('en-US', { weekday: 'long' })
const month = d.toLocaleDateString('en-US', { month: 'long' })
return { full: `${weekday}, ${month} ${d.getDate()}, ${d.getFullYear()}` }
const weekday = d.toLocaleDateString('en-US', { weekday: 'long', timeZone: 'Asia/Kolkata' })
const month = d.toLocaleDateString('en-US', { month: 'long', timeZone: 'Asia/Kolkata' })
const day = d.toLocaleDateString('en-US', { day: 'numeric', timeZone: 'Asia/Kolkata' })
const year = d.toLocaleDateString('en-US', { year: 'numeric', timeZone: 'Asia/Kolkata' })
return { full: `${weekday}, ${month} ${day}, ${year}` }
Comment on lines +40 to +44

Copilot AI Apr 2, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

parseEventDate builds the final string by calling toLocaleDateString four separate times. This is harder to maintain and does extra work; it can be replaced with a single toLocaleDateString (or Intl.DateTimeFormat) call that includes weekday/month/day/year and timeZone: 'Asia/Kolkata' to produce the same output deterministically.

Suggested change
const weekday = d.toLocaleDateString('en-US', { weekday: 'long', timeZone: 'Asia/Kolkata' })
const month = d.toLocaleDateString('en-US', { month: 'long', timeZone: 'Asia/Kolkata' })
const day = d.toLocaleDateString('en-US', { day: 'numeric', timeZone: 'Asia/Kolkata' })
const year = d.toLocaleDateString('en-US', { year: 'numeric', timeZone: 'Asia/Kolkata' })
return { full: `${weekday}, ${month} ${day}, ${year}` }
const full = d.toLocaleDateString('en-US', {
weekday: 'long',
month: 'long',
day: 'numeric',
year: 'numeric',
timeZone: 'Asia/Kolkata'
})
return { full }

Copilot uses AI. Check for mistakes.
}

/**
Expand All @@ -50,7 +52,7 @@ function parseEventDate(iso) {
*/
function formatEventTime(iso) {
if (!iso) return ''
return new Date(iso).toLocaleTimeString('en-IN', { hour: '2-digit', minute: '2-digit', hour12: true })
return new Date(iso).toLocaleTimeString('en-IN', { hour: '2-digit', minute: '2-digit', hour12: true, timeZone: 'Asia/Kolkata' })
}

/**
Expand Down
Loading