Skip to content

Instantly share code, notes, and snippets.

@allfreelancers
allfreelancers / timezones-snippet.html
Created October 21, 2018 17:35
Mysql Timezones in HTML Select
<!--
mysql query to generate option list
SELECT CONCAT('<option value="', `Name`, '">', `Name`, '</option>') FROM mysql.time_zone_name;
if mysql.time_zone_name has no records go here: http://dev.mysql.com/downloads/timezones.html
to convert date/time between timezones do something like this:
SELECT startdate, CONVERT_TZ(startdate, 'utc', (SELECT timezone FROM accounts WHERE id=1)) FROM auctions;
-->
@allfreelancers
allfreelancers / flush.php
Created May 23, 2018 08:57 — forked from arnaud-lb/flush.php
flush email queue from symfony command
<?php
protected function flushQueue()
{
$container = $this->getContainer();
$transport = $container->get('mailer')->getTransport();
$spool = $transport->getSpool();
$spool->flushQueue($container->get('swiftmailer.transport.real'));