• I’ve set up the date and time correctly in the WP general settings, but every Invoice that I send has an incorrect date and time. As far as I can tell, WP-Invoice does not have its own separate time settings. (or does it?)
    Everywhere else on the site has the correct time, it just seems like the Wp-Invoice that is having this issue.

    Any Thoughts? Thanks!

    https://www.ads-software.com/extend/plugins/wp-invoice/

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Contributor Anton Korotkoff

    (@anton-korotkoff)

    Hello madnhain,

    we will test that and answer here soon.

    Thank you.

    Plugin Contributor Anton Korotkoff

    (@anton-korotkoff)

    Hello again madnhain,

    what date are you talking about? Could you please provide some data on how to replicate the issue?

    Thanks.

    Thread Starter madnhain

    (@madnhain)

    Certainly!
    From the WP Dashboard, Invoice > Add new invoice
    for testing reasons, I entered the time of creation into the name and body fields
    Save and Send notification

    Then, View All invoices, select the one you just created
    Inside the Top Area “Invoice Status and History”

    11:43 am June 6, 2013 Notification Sent (New Invoice) to [email protected] at 11:43 am June 6, 2013.
    11:43 am June 6, 2013 Created by admin

    inside my body:

    This invoice was created @ 6:43AM June 6th, 2013

    (I just noticed this)
    While just looking at my settings to be SURE the time was set correctly, I see this:

    UTC time is 2013-06-06 11:57:26 Local time is 2013-06-06 6:57:26

    So apparently Invoice is using UTC instead of Local time?
    Any thoughts on this? Thanks!

    Plugin Contributor Anton Korotkoff

    (@anton-korotkoff)

    Thank you for clear explanation. I’ll let you know once we investigate this.

    Plugin Contributor Anton Korotkoff

    (@anton-korotkoff)

    @madnhain, you are right.

    This is a timezone issue. We are going to fix it and include into the next release.

    Thank you.

    Thread Starter madnhain

    (@madnhain)

    Thanks Anton! I appreciate you looking into this!

    Plugin Contributor Anton Korotkoff

    (@anton-korotkoff)

    Thank you too for using our products.

    Is there a special wpi function to display the date the invoice was created?

    Using
    the_date(get_option('date_format')) or the_date()
    in my custom template shows December 13, 2012 no matter when the invoice was created.

    Assigning a due date and using
    wpi_invoice_due_date()
    in a custom template displays the correct due date.

    Sample invoice
    Sample invoice created: June 17, 2013
    Due date 1 week: June 24, 2013

    I’m using wp-invoice Version 3.08.6

    Plugin Contributor Anton Korotkoff

    (@anton-korotkoff)

    Hello @dan,

    function the_date() will always show you the date of the page you are using to display invoice.

    Currently plugin doesn’t have template function for invoice date but you always can use this:

    echo $invoice['post_date'];

    It is a bit ugly but we are going to review our template function and add more useful ones.

    Thank you!

    @anton
    I understand… I’m seeing the date December 13, 2012 because the page I dedicated to display invoices was created on that date, nothing to do with the date the invoice was created.

    You’re right, echo $invoice['post_date']; is a bit ugly.
    YYYY-MM-DD HH:MM:SS isn’t the format I would like to use.

    I’ll stick to adding the date in the description section for now. Hopefully the date functions will be available soon. Thanks for the help and great plugin.

    Plugin Contributor Anton Korotkoff

    (@anton-korotkoff)

    @dan,

    try this temporary

    echo date(get_option('date_format'), strtotime( $invoice['post_date'] ));

    Nailed it! That’s exactly what I’m looking for. Thank you very much.

    Plugin Contributor Anton Korotkoff

    (@anton-korotkoff)

    Good!

    Thank you for using our product. We will improve this soon anyway.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Correct Date and time’ is closed to new replies.