CFv8 date shortcode - How to display in site's timezone instead of UTC

Display ChronoForms v8 date shortcodes in the site's local timezone.

Overview

The CFv8 date shortcodes default to showing UTC time, even when the Joomla site and PHP are configured for a specific timezone.
Use a PHP action to generate the date in the correct timezone and then output that value using a {var:} shortcode instead of the date shortcodes.

Answered
ChronoForms v8
da david3482 16 Dec, 2023
PHP 8.0.30 - php.ini: date.timezone = America/New_York
Joomla 4.4.1 - configuration.php: public $offset = 'America/New_York';
Chronoforms 8.0.17

Dates in Joomla (e.g., Article create date) display in ET (local New York time) and are saved to the database in UTC.

Dates in Chronoforms show as UTC for all of the below shortcodes:
{date:}
{date.site:}
{date.America/New_York:}

How do I get Chronoforms v8 to display New York time, the same as my Joomla site?
Max_admin Max_admin 17 Dec, 2023
Answer
v8 does not have timezone shortcode, you need to do this in a PHP action and return the value you want then use it a {var:php_action_name}
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.