Hello madnhain,
we will test that and answer here soon.
Thank you.
Hello again madnhain,
what date are you talking about? Could you please provide some data on how to replicate the issue?
Thanks.
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 xxx.xxx@gmail.com 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!
Thank you for clear explanation. I’ll let you know once we investigate this.
@madnhain, you are right.
This is a timezone issue. We are going to fix it and include into the next release.
Thank you.
Thanks Anton! I appreciate you looking into this!
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
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.
@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.
Good!
Thank you for using our product. We will improve this soon anyway.