timezone fix
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
---
|
||||
import { format } from "date-fns";
|
||||
import { formatInTimeZone } from "date-fns-tz";
|
||||
|
||||
interface Props {
|
||||
title: String;
|
||||
@@ -11,5 +11,7 @@ const { title, date } = Astro.props;
|
||||
|
||||
<div class="blog-header">
|
||||
<h4>{title}</h4>
|
||||
<h5>{`🗓️ ${format(new Date(date), "MMM do, y")}`}</h5>
|
||||
<h5>
|
||||
{`🗓️ ${formatInTimeZone(new Date(date), "America/New_York", "MMM do, y")}`}
|
||||
</h5>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user