I am using the REST API with the GET /invoices endpoint to extract the customer invoices list and I found that the last date modification show in Dolibarr for the invoices is different to the “date_modification” extracted by the REST API.
For example I have one invoice in my Dolibarr installation V21.0.0 that shows date modification 11/06/2025 06:06 PM, what is correct, but in the extracted data by the API it shows "date_modification": 1749683209 that correspond to 2025-06-09 11:33:29 UTC what is two days earlier and this happens for all extracted invoices.
Do you know why this is happening?
How can I fix it?
@jonbendtsen I reviewed all dates and there is no other date from the extracted records that matches the date modification in dolibar invoice list.
The invoices are generated directly in the invoices module and by TakePOS(there are both type of invoices with same problem). Not generated from an order.
Hey @leonm2, this looks like the API is returning the raw database value for date, modification, which might reflect the last time the record was touched by any background process or module, even if no visible changes were made. Since you’re using both the invoices module and TakePOS, TakePOS may be updating the invoice metadata in some way that affects the timestamp. The UI, on the other hand, may display a different value based on user-driven edits or other logic. That could explain why the dates don’t match. To confirm this, you might want to check the logs or enable debug mode to trace what process is modifying those records.
I was reviewing the TimeStamp conversion used in my systems that read the extracted date modification and it has an interpretation error of the timeStamp dates.
It solves this topic.