Код: Выделить всё
OS Ubuntu's Timezone: Asia/Tokyo(JST)
MySQL(RDS)'s Timezone: System
Код: Выделить всё
30 * * * * cd project && php bin/console command-name
Код: Выделить всё
$em = $this->getContainer()->get('doctrine')->getManager();
$newsletters = $em->getRepository('AppBundle:Newsletter')->getNewsletterForDelivery()->getQuery()->getResult();
Код: Выделить всё
public function getNewsletterForDelivery()
{
$qb = $this->getEntityManager()->createQueryBuilder();
$qb->select('n')
->from('AppBundle:Newsletter', 'n')
->andWhere("DATE_FORMAT(n.sendDatetime,'%Y-%m-%d %H:%i')
Подробнее здесь: [url]https://stackoverflow.com/questions/79214186/symfony-picking-up-wrong-data-based-on-condition-in-production[/url]
Мобильная версия