Skip to content

Commit 84c41a0

Browse files
committed
fix(library): format content dates in UTC to avoid off-by-one day
1 parent ac9d287 commit 84c41a0

3 files changed

Lines changed: 7 additions & 0 deletions

File tree

apps/sim/app/(landing)/components/content-author-page/content-author-page.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ export function ContentAuthorPage({
7373
month: 'short',
7474
day: 'numeric',
7575
year: 'numeric',
76+
timeZone: 'UTC',
7677
})}
7778
</span>
7879

@@ -82,6 +83,7 @@ export function ContentAuthorPage({
8283
month: 'short',
8384
day: 'numeric',
8485
year: 'numeric',
86+
timeZone: 'UTC',
8587
})}
8688
</span>
8789
<h3 className='text-[var(--text-primary)] text-base leading-tight tracking-[-0.01em] lg:text-lg'>

apps/sim/app/(landing)/components/content-index-page/content-index-page.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ export function ContentIndexPage({
8686
month: 'short',
8787
day: 'numeric',
8888
year: 'numeric',
89+
timeZone: 'UTC',
8990
})}
9091
</span>
9192
<h3 className='text-[var(--text-primary)] text-lg leading-tight tracking-[-0.01em]'>
@@ -114,6 +115,7 @@ export function ContentIndexPage({
114115
month: 'short',
115116
day: 'numeric',
116117
year: 'numeric',
118+
timeZone: 'UTC',
117119
})}
118120
</span>
119121

@@ -123,6 +125,7 @@ export function ContentIndexPage({
123125
month: 'short',
124126
day: 'numeric',
125127
year: 'numeric',
128+
timeZone: 'UTC',
126129
})}
127130
</span>
128131
<h3 className='text-[var(--text-primary)] text-base leading-tight tracking-[-0.01em] lg:text-lg'>

apps/sim/app/(landing)/components/content-post-page/content-post-page.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ export function ContentPostPage({
8383
month: 'short',
8484
day: 'numeric',
8585
year: 'numeric',
86+
timeZone: 'UTC',
8687
})}
8788
</time>
8889
<meta itemProp='dateModified' content={post.updated ?? post.date} />
@@ -154,6 +155,7 @@ export function ContentPostPage({
154155
month: 'short',
155156
day: 'numeric',
156157
year: 'numeric',
158+
timeZone: 'UTC',
157159
})}
158160
</span>
159161
<h3 className='text-[var(--text-primary)] text-lg leading-tight tracking-[-0.01em]'>

0 commit comments

Comments
 (0)