I am trying to get days difference between 2 dates with mysql query with DATEDIFF function for production_days column:
$collection->getSelect()->joinLeft(array('cvo' => 'cp_vendor_order'), "cvo.parent_order_id = main_table.entity_id AND cvo.vendor_name ='".$configVendorName."'",array('production_days' => new \Zend_Db_Expr('DATEDIFF(ship_by_date,NOW())')))
The issue is NOW() provides different timezone rather than IST(Indian Standard Time) and i want to use IST timezone when we call NOW() , can anyone let me know how to achieve this thing?