Jump to content
  • 0

Invoice Dates Incorrect


PhatPixel

Question

I have just migrated from v2.5 to v3.1 and created an invoice today with the billing and due dates both 18 February -- however when I view a PDF copy of the invoice the dates show as 17 February.  Presumably, this is a timezone conversion problem.  

 

I am located in Australia EDT (currently +11) and the server has UTC time.  When I check the timestamp in the database, it shows as "2014-02-17 13:00:00" which would suggest that 11 hours are being taken off the server time, which is incorrect as the server is already in UTC.

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

The company timezone is correctly set, there seems to be a problem with the calculation.  As mentioned, we are UTC+10 (currently +11 for summer).  I suspect that Blesta is subtracting 11 hours from the server time as it is assuming the server is also in AEDT, but it is not -- the server is already in UTC.

Link to comment
Share on other sites

  • 0

Update: I have created some new invoices today and the dates are displaying correctly.

 

Perhaps I had not set the system date correctly when I created the invoices yesterday.  It appears that the dates are stored in the database -11hrs from local midnight (i.e. 2014-02-19 00:00:00 is stored as 2014-02-18 13:00:00).  I had expected they would be stored as -11hrs from the time of creation, but as the billing/due dates don't use hours, minutes and seconds I can see why they are stored this way.

 

I hope this doesn't become a problem when we return back to standard time, as we will then be UTC+10 so 2014-02-18 13:00:00 in the database could become 2014-02-18 23:00:00 and possibly display as the previous day?

Link to comment
Share on other sites

  • 0

I think I have found the problem, and it looks to be a bug.  When I create an invoice and save it as a draft, the Invoice Billed Date appears correctly in the interface but is the previous day when displayed on the PDF (we are in UTC+11 until this weekend, when we fall back to UTC+10).

Link to comment
Share on other sites

  • 0

I can confirm that all PDFs (draft or not) show a the Invoice Date (Date Billed) and Due Date one day behind the interface. My timezone is UTC+12, start day Monday and I've tested this on both my Windows dev server and Ubuntu production server. I tested this on my dev server at 9:00 AM, the invoices on my production server were created a few days ago at around 5:00 AM.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...