Display Entry’s Date Created in Site Timezone

Code

Filename: gpeb-display-date-created-in-site-timezone.php

<?php
/**
 * Gravity Perks // Entry Blocks // Display Entry's Date Created in Site Timezone
 * https://gravitywiz.com/documentation/gravity-forms-entry-blocks/
 */
add_filter( 'gpeb_entry', function( $entry ) {
	// Convert entry's updated date to WordPress timezone and change format.
	$entry['date_updated'] = get_date_from_gmt( $entry['date_updated'], 'Y-m-d H:i:s' );
	return $entry;
} );

Leave a Reply

Your email address will not be published. Required fields are marked *

  • Trouble installing this snippet? See our troubleshooting tips.
  • Need to include code? Create a gist and link to it in your comment.
  • Reporting a bug? Provide a URL where this issue can be recreated.

By commenting, I understand that I may receive emails related to Gravity Wiz and can unsubscribe at any time.