symfony2admingenerator / AvocodeFormExtensionsBundle

(old-legacy) Symfony2 form extensions for Admingenerator project (also working standalone!)
Other
48 stars 31 forks source link

[BUG] afe_datetime_picker save wrong date #95

Open denys281 opened 10 years ago

denys281 commented 10 years ago

Hi, I use afe_datetime_picker,

My entity:

    /**
     * @var \DateTime
     *
     * @ORM\Column(name="date", type="datetime")
     */
    private $date;

/**
     * Set date
     *
     * @param \DateTime $date
     * @return TvGuide
     */
    public function setDate($date)
    {
        $this->date = $date;

        return $this;
    }

    /**
     * Get date
     *
     * @return \DateTime 
     */
    public function getDate()
    {
        return $this->date;
    }

And my generator:

date:
            label: Время
            formType: afe_datetime_picker

So, when I select in admin for example 25.12.2013, it save to db 24.12.2013. So each time it save date before selected date. I try afe_date_picker and it works correct.

satiricon commented 10 years ago

I'm having the same problem with this type. Weird thing is that I have the problem just in my prod server. I cant replicate this behaviour in my dev server.