Skip to content

Commit

Permalink
fix: issue with timezone for resume book creation pt. 2 📚 (#377)
Browse files Browse the repository at this point in the history
  • Loading branch information
ramiAbdou authored Jul 17, 2024
1 parent cf99e16 commit 528b80f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/core/src/modules/resume-book/resume-book.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,15 @@ const ResumeBook = z.object({
airtableTableId: z.string().trim().min(1),
createdAt: Entity.shape.createdAt,
endDate: z.string().transform((value) => {
return dayjs(value, 'America/Los_Angeles').endOf('date').toDate();
return dayjs(value).tz('America/Los_Angeles', true).endOf('date').toDate();
}),
id: Entity.shape.id,
name: z.string().trim().min(1),
startDate: z.string().transform((value) => {
return dayjs(value, 'America/Los_Angeles').startOf('date').toDate();
return dayjs(value)
.tz('America/Los_Angeles', true)
.startOf('date')
.toDate();
}),
});

Expand Down

0 comments on commit 528b80f

Please sign in to comment.