Skip to content

Commit

Permalink
Merge branch 'main' into staging
Browse files Browse the repository at this point in the history
  • Loading branch information
padms committed Feb 7, 2025
2 parents 5c3a68e + 7a7cd42 commit 68d88c2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
16 changes: 6 additions & 10 deletions web/common/helpers/dateUtilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,16 @@ export const getEventDates = (eventDate: EventDateType | undefined) => {
const { date, startTime, endTime, timezone } = eventDate
if (!date) return { start: null, end: null }

const universalDate = date.replace(/-/g, '/')

if (startTime && endTime) {
const start = zonedTimeToUtc(new Date(universalDate + ' ' + startTime), timezone).toString()
const end = zonedTimeToUtc(new Date(universalDate + ' ' + endTime), timezone).toString()

return { start: start, end: end }
const start = zonedTimeToUtc(new Date(`${date}T${startTime}`), timezone).toISOString()
const end = zonedTimeToUtc(new Date(`${date}T${endTime}`), timezone).toISOString()
return { start, end }
} else {
const [YYYY, MM, DD] = date.split('-').map(Number)
const start = new Date()
start.setDate(DD)
start.setMonth(MM - 1)
start.setFullYear(YYYY)
start.setFullYear(YYYY, MM - 1, DD)
start.setHours(12, 0, 0, 0)
return { start: start.toString(), end: null }

return { start: start.toISOString(), end: null }
}
}
4 changes: 3 additions & 1 deletion web/core/Topbar/Topbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,9 @@ export const Topbar = forwardRef<HTMLDivElement, TopbarProps>(function Topbar(
{showSticky && (
<StickyMenu
stickyMenuData={stickyMenuData}
className={`${isVisible ? 'top-[calc(var(--topbar-height)-1px)] pt-2' : 'top-0'}`}
className={`${
isVisible ? 'top-[calc(var(--topbar-height)-5px)] lg:top-[calc(var(--topbar-height)-2px)] pt-2' : 'top-0'
}`}
/>
)}
</>
Expand Down

0 comments on commit 68d88c2

Please sign in to comment.