Search by

drupal-eca-recipe / eca_lib_0031

Reads a date value from a node field and demonstrates the tamper actions that reformat it, shift it by a fixed time range and render it in another time zone.

Maintainers

Package info

gitlab.lakedrops.com/drupal/recipes/eca_lib_0031

Type:drupal-recipe

pkg:composer/drupal-eca-recipe/eca_lib_0031

Transparency log

Statistics

Installs: 106

Dependents: 0

Suggesters: 0

3.1.9 2026-09-01 14:12 UTC

This package is auto-updated.

Last update: 2026-09-01 14:13:27 UTC


README

ID: eca_lib_0031

This model works with a date and time value from a node field and does various things to it: outputting in different formats, adding some time range, changing timezone, etc.

The time zone plugins used by this model ship with the tamper module as of version 1.0.0, so the patch that was once needed is no longer required. Writing a date value back into a date field still needs care with time zones - see Writing date and time values in the correct time zone for the details.

The creation of this module was recorded and the video with additional explanations can be watched here.

Installation

## Import recipe
composer require drupal-eca-recipe/eca_lib_0031

# Apply recipe with Drush (requires version 13 or later):
drush recipe ../recipes/eca_lib_0031

# Apply recipe without Drush:
cd web && php core/scripts/drupal recipe ../recipes/eca_lib_0031

# Rebuilding caches is optional, sometimes required:
drush cr