I have created an event content type, with a date & time field that’s had its Time Zone Handling set to “date’s time zone”, and has been formatted to display that time zone on the finished event node. As the events are online events that are run by people in different time zones, I wanted to do this to allow the organizers to use their local time - but I also want to have another display that shows that same date in the date and time based on a logged-in user’s own set time zone.

IE; if a date is set for 8pm EST,  but a user’s time zone is set to PST, they’ll see both the original 8pm EST, and another field/display that shows them the local time will be 5pm PST for them.

I know I can achieve this by just putting in another date field and setting it to handle locally, but I would really rather not have to have everyone fill it out twice. I feel like there’s a way to do it using just the one field. I tried putting together a views block that would pull the data again like some google results suggested, but it doesn’t seem to have an option to let me pick the time zone format again.

Comments

Olafski's picture

Being on a vacation, I can't check the option to choose a time zone format in a views block. However, here is another idea: Add the field to a layout.

Backdrop allows individual fields to be displayed as separate blocks. These field blocks are available in the Layout UI "Add block" list if the layout has a node context, see https://docs.backdropcms.org/documentation/layout-contexts.

I did try something similar to this as well, but as far as I can tell, there is no option to set the timezone handling in backdrop's views. :( I can set a different date format, but I cannot change the time zone localization.

Backdrop doesn't offer the ability of selecting the timezone in Views for date fields. This ability exists in Views for date properties (such as "Post date" for nodes) but not for Field API date fields. Perhaps you can request this as a feature in the Backdrop issue queue?  

Thanks, I will see what I can do. I have been looking at different modules trying to find something that works, but so far no dice - I may just have to ask, or see if I can figure out how to code something myself.

I was able to make a bit of a workaround in Views, by adding the date field twice and then setting the second one to “time ago”, which counts down how much time is left until the date and time are reached.