-
Notifications
You must be signed in to change notification settings - Fork 4
fix: timezone fix on mail, changed utc to asia/kolkata #69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -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
|
||||||||||||||||||||||||||||
| 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 } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
defaultTimezoneis 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.