I have been trying to troubleshoot an issue where my client adds dates to an event only to have them show up as a different date (a day before or earlier) on front end of site.
I have a feeling this is something to do with the server time zone and or client timezone.
I have noticed the date field is also actually a date and time field.
How do I ensure there is a standard way of adding a date to an event where it will reliably display the intended date ?
Hi Urszula,
Sure, so all dates in admin will show your local time, however, these are stored as UTC. When outputting these dates, these will show as UTC.
What you can do is hardcode a timezone within your layouts. For example, {{this.release_date | to_time: "America/New_York"}}
You can find out more information on this here:
Docs - to_time
Docs - timezone names
You may also find this feature request of interest which you can add your vote to - https://roadmap.siteglide.com/siteglide-roadmap/p/global-define-a-timezone-for-each-site
Thanks!
thanks Emily