Title: Wrong submit time
Last modified: May 29, 2020

---

# Wrong submit time

 *  [myideasforsite](https://wordpress.org/support/users/myideasforsite/)
 * (@myideasforsite)
 * [6 years ago](https://wordpress.org/support/topic/wrong-submot-time/)
 * Hello. When I submit form I get wrong submit time in admin panel submit list.
   Date is ok. Can anyone help me with this?
    -  This topic was modified 6 years ago by [myideasforsite](https://wordpress.org/support/users/myideasforsite/).

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [Abbas](https://wordpress.org/support/users/xllentech/)
 * (@xllentech)
 * [5 years, 12 months ago](https://wordpress.org/support/topic/wrong-submot-time/#post-12984418)
 * Same problem here.. I am in MST timezone and I get date and time both wrong. 
   Looks like the plugin doesn’t follow WordPress general settings Timezone which
   can easily be used with wp_timezone() and wp_timezone_string(). Hope the author
   will correct this. Thank you for the great plugin.
 *  [Andre Aguiar Villela](https://wordpress.org/support/users/dedevillela/)
 * (@dedevillela)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/wrong-submot-time/#post-13232760)
 * +1 here! This isn’t an issue before, now I have to change the times in the exported
   file by hand; please fix this ASAP!
 * Best regards,
    — Andre
 *  [luiscam](https://wordpress.org/support/users/luiscam/)
 * (@luiscam)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/wrong-submot-time/#post-13530734)
 * I have the same problem. I checked the server time (WHM), the wordpress time 
   and are ok. But in Advanced Contact Form 7 DB the submit_time appears 5 hours
   ahead.
 *  [adriangreen](https://wordpress.org/support/users/adriangreen/)
 * (@adriangreen)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/wrong-submot-time/#post-13864937)
 * I can confirm that it is still happening. The time is UTC, not the local time(
   date.timezone =”country/place” PHP config).
    Slightly difficult solution: My 
   preference would be for the submit_time to stay as UTC but for the data presentation(
   exports, admin forms) to show the DateTime in the defined timezone. Additionally
   the logic would be applied to all the SQL used. Trivial solution: Save the data
   in the local timezone. DIY solution: Use the vsz_cf7_posted_data filter:
 *     ```
       function example_cf7_modify_form_before_insert_data( $posted_data ) {
       	$timestamp = WPCF7_Submission::get_instance()->get_meta( 'timestamp' );
       	if ( $timestamp ) {
       		$date = ( new DateTime( '', new DateTimezone( wp_timezone_string() ) ) )->setTimestamp( $timestamp );
       		$posted_data['submit_time'] = $date->format( 'Y-m-d H:i:s' );
       	}
   
       	return $posted_data;
       }
       ```
   
    -  This reply was modified 5 years, 5 months ago by [adriangreen](https://wordpress.org/support/users/adriangreen/).
      Reason: remove hard-coded timezone string

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Wrong submit time’ is closed to new replies.

 * ![](https://ps.w.org/advanced-cf7-db/assets/icon-256x256.jpg?rev=1696186)
 * [Advanced Contact form 7 DB](https://wordpress.org/plugins/advanced-cf7-db/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/advanced-cf7-db/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/advanced-cf7-db/)
 * [Active Topics](https://wordpress.org/support/plugin/advanced-cf7-db/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/advanced-cf7-db/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/advanced-cf7-db/reviews/)

## Tags

 * [timezone](https://wordpress.org/support/topic-tag/timezone/)
 * [Wrong time](https://wordpress.org/support/topic-tag/wrong-time/)

 * 4 replies
 * 5 participants
 * Last reply from: [adriangreen](https://wordpress.org/support/users/adriangreen/)
 * Last activity: [5 years, 5 months ago](https://wordpress.org/support/topic/wrong-submot-time/#post-13864937)
 * Status: not resolved