When showing posts from wordpress and presenting a date. I get the following warning the console:
Warning: Text content did not match. Server: "January 20, 2021" Client: "20 januari 2021"
Im first using the code from the mars theme to get the date:
const data = state.source.get(state.router.link);
const post = state.source[data.type][data.id];
const date = new Date(post.date);
When presenting the date I want to adjust it to a Swedish format:
date.toLocaleDateString("sv-SE", { month: "long", day: "numeric", year: "numeric" })
Are there server options I need to adjust, or why is frontity comparing server date with the client date?