This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Zim\Bundle\SymfonyRestHelperBundle\Doctrine; | |
use Doctrine\Common\Collections\ArrayCollection; | |
use Doctrine\Common\Collections\Collection; | |
trait ORMSetterTrait | |
{ | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const queue = [] | |
let canExecuteThisTick = true | |
import {nextTick} from 'vue' | |
export function useTickSequence() { | |
const processQueue = () => { | |
if (canExecuteThisTick) { | |
canExecuteThisTick = false | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$wrongDate = new \DateTime('2018-04-25 16:00:00', new \DateTimeZone('+0300')); | |
// Wed, 25 Apr 2018 16:00:00 +0300 | |
fixZone($wrongDate, new \DateTimeZone('UTC')); | |
// Wed, 25 Apr 2018 16:00:00 +0000 | |
function fixZone(\DateTime $dateTime, DateTimeZone $rightZone) | |
{ | |
$offset = $dateTime->getOffset(); | |
$zoneOffset = $rightZone->getOffset($dateTime); |