GratefulGarmentProject / StockAid

A website for tracking inventory
MIT License
79 stars 25 forks source link

Time zone mismatches for orders #799

Open smellsblue opened 3 years ago

smellsblue commented 3 years ago

The order date is stored in the database in UTC and reporting on the date needs to be Pacific time.

Either change order date to just be date and no time, or update relevant places (such as syncing to netsuite and reporting) to search/format based on Pacific time.

Double check with Lisa before we strip time from orders... probably best to keep the time.

smellsblue commented 3 years ago

For example: this code in order exporting:

      invoice_record.tran_date = order.order_date.strftime "%Y-%m-%dT%H:%M:%S.%L%z"

Can sometimes push the order date to the wrong date because it is UTC.