hello everyone :) noob here
how come when i do a date it shows my locale timezone from local build (with npm run preview
)
but when i deploy it to cloudflare the webpage i get is on UTC time.
i'd like it to be my timezone too
function timeElements(date: string, time: string) {
const timeFromString = new Date(`${date}T${time}:00.000+08:00`);
const formattedDateString = datefns.format(timeFromString, "MMM do, yyyy | K:mm XX") // added XX here to show timezone
const dateAttrVal = datefns.format(timeFromString, "yyyy-LL-dd KK:mm")
return (
<>
<time dateTime={dateAttrVal}>{formattedDateString}</time>
</>
)
}
here is how the locathost looks like with vite it has +0800 in the end:
it is my timezone and what i'd want it to look like
but it has Z at the end from the deployed one:
is there something i could specify in the webpage or the html to force this?
the overall framework i'm using btw is the qwik framework deployed to cloudflare pages