WordPress.org

Ready to get started?Download WordPress

Forums

Fast Secure Contact Form
Fix for incorrect Date/Time timestamp in emails (2 posts)

  1. doublerebel
    Member
    Posted 3 months ago #

    As reported in several places, users have trouble getting the correct timestamp in their contact form emails:
    http://wordpress.org/support/topic/plugin-fast-and-secure-contact-form-timezone-incorrect-in-email-message?replies=2
    http://wordpress.org/support/topic/plugin-fast-secure-contact-form-time-lag-between-sending-and-receiving
    http://wordpress.org/support/topic/time-stamp-problem-with-fs-contact-form-plugin

    My timezone is already set correctly as instructed here:
    http://www.fastsecurecontactform.com/tip-set-timezone

    So I decided to look into the code.

    It looks like the code just uses PHP's plain time() method to get the timestamp. This will always be in UTC. So I corrected it to current_time('timestamp') as according to the WordPress docs:
    https://codex.wordpress.org/Function_Reference/current_time

    The changes must be made on lines 499 and 938 in file si-contact-form/includes/class-fscf-process.php . You can edit the plugin from within WordPress and just Ctrl+F (or Command+F) for time() and replace it.

    Works great for me on WordPress 3.8.2 with FS Contact Form plugin 4.0.18.

    https://wordpress.org/plugins/si-contact-form/

  2. webmystery
    Member
    Posted 2 months ago #

    Thank you doublerebel! Works perfectly. - you saved me a whole lot of time.

    Now Iet's hope it is fixed in the next revision, so the fix isn't overwritten when I'm not around to re-fix it.

Reply

You must log in to post.

About this Plugin

About this Topic