• Resolved shan445

    (@shan445)


    Hello,

    This plugin is beautiful ! Thank you !

    I have a problem with Excel exports…

    The hours are not fair…

    If on the site I send a form to 15:00, when I generate the Excel, it is displayed 14:00

    In the WordPress settings, the time is correctly displayed.

    How to fix this problem please ?

    Thank you.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Doeke Norg

    (@doekenorg)

    Hi @shan445

    Do you mean the time the entry was posted? Let me check on that.

    Can you provide me some versions of php, gf and the plug-in?

    Thanks in advance.

    Thread Starter shan445

    (@shan445)

    Hello Doeke,

    Thank you for your prompt response.

    Yes exactly.

    Once the Excel file is generated, the times are not correct.

    If I send a message now on the form (16:22 local time), on the Excel, it is indicated 15:22.

    Gravity Forms : 2.3.3.6
    Gravity Forms Entries in Excel : 1.6.0
    WordPress : 5.0.3
    PHP : 7.2.15

    • This reply was modified 6 years, 1 month ago by shan445.
    Plugin Author Doeke Norg

    (@doekenorg)

    Hi @shan445,

    You are 100% correct. I’ve dropped the ball there. But I have a quick fix for you.

    add_filter('gfexcel_export_field_value', function ($value, $form_id, $input_id, $entry) {
        if (!in_array($input_id, ['date_created', 'payment_date'])) {
            return $value; // default
        }
        $lead_gmt_time = mysql2date('G', $entry[$input_id]);
        $lead_local_time = GFCommon::get_local_timestamp($lead_gmt_time);
        return date_i18n('Y-m-d H:i:s', $lead_local_time, true);
    }, 10, 4);

    Add this to your functions.php and all should be well. I’ll also fix this in the plugin on the next release. I’ll give you a heads up so you can remove this piece of code.

    Please let me know if this works!

    Thread Starter shan445

    (@shan445)

    Hello Doeke,

    It’s great, it works !

    Thank you very much for the speed !

    See you soon ??

    Plugin Author Doeke Norg

    (@doekenorg)

    Fixed as of 1.6.1.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Hour problem’ is closed to new replies.