# Entry time not wot work after update

**URL:** <https://community.gravityforms.com/t/entry-time-not-wot-work-after-update/10041>\
**Category:** Get Help\
**Tags:** gform\_replace\_merge\_tags, entry-time\
**Created:** [June 26, 2021, 8:20pm UTC](https://community.gravityforms.com/t/entry-time-not-wot-work-after-update/10041 "2021-06-26T20:20:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![user5fecd460a17e0796](https://avatars.discourse-cdn.com/v4/letter/u/b38774/32.png) [@user5fecd460a17e0796](https://community.gravityforms.com/u/user5fecd460a17e0796)\
**Post date:** [June 26, 2021, 8:20pm UTC](https://community.gravityforms.com/t/entry-time-not-wot-work-after-update/10041/1 "2021-06-26T20:20:04Z")

</div>

hello i want to get form entry time and date and print it on customer receipt or send it to email

i use this script in function.php theme

```auto

add_filter( 'gform_replace_merge_tags', 'djb_gform_replace_merge_tags', 10, 7 );
function djb_gform_replace_merge_tags( $text, $form, $entry, $url_encode, $esc_html, $nl2br, $format ) {
if ( strpos( $text, '{current_hour}' ) !== false ) {
$text = str_replace( '{current_hour}', current_time( 'G' ), $text );
}
if ( strpos( $text, '{current_minute}' ) !== false ) {
$text = str_replace( '{current_minute}', current_time( 'i' ), $text );
}
return $text;
}

```

this code work well before i update gravityform to 2.5

now the Date work well but it show the time 00:00

seems something is wrong or must change in my code for work with new version

anyone have any idea whats the problem ?

thanks

---

<div class="post-metadata">

**Author:** ![chrishajer](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/chrishajer/32/88_2.png) [@chrishajer](https://community.gravityforms.com/u/chrishajer)\
**Post date:** [June 28, 2021, 4:24pm UTC](https://community.gravityforms.com/t/entry-time-not-wot-work-after-update/10041/2 "2021-06-28T16:24:23Z")

</div>

I recommend using the built in logging in Gravity Forms and adding some custom logging statements to your code. First, enable logging:

> **[Logging and Debugging - Gravity Forms Documentation](https://docs.gravityforms.com/logging-and-debugging/#enabling-logging)**
>
> For quite a while, enabling logging within Gravity Forms has been a go-to method for debugging any issues within Gravity Forms. As of Gravity Forms version 2.2, logging functionality has been moved from a separate add-on to becoming a core feature of...

Then add some custom logging statements to your code to see what’s no longer working. I recommend adding a logging statement inside each conditional and also after any variable is assigned a value:

> **[Custom Logging Statements - Gravity Forms Documentation](https://docs.gravityforms.com/custom-logging-statements/#writing-to-the-core-log)**
>
> While Gravity Forms and its add-ons include numerous logging statements sometimes you may need to add more. This article explains how to add custom logging.

---

<div class="post-metadata">

**Author:** ![richardw8k](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/richardw8k/32/2354_2.png) [@richardw8k](https://community.gravityforms.com/u/richardw8k)\
**Post date:** [January 5, 2022, 8:31am UTC](https://community.gravityforms.com/t/entry-time-not-wot-work-after-update/10041/3 "2022-01-05T08:31:21Z")

</div>


