People,

I would add more onde detail:

My entity was defined:
    /**
     * @var \DateTime
     *
     * @ORM\Column(name="start_date", type="datetime", precision=0, 
scale=0, nullable=false, unique=false)
     * @Assert\NotBlank()
     */
    private $star_date;

Thank you,
Aline.

Em quarta-feira, 14 de setembro de 2016 09:35:08 UTC-3, Aline Macena 
escreveu:
>
> Hi,
>
> My command is as bellow in class Admin Sonata:
>
> *protected function configureFormFields(FormMapper $formMapper)*
> *{*
> *        $formMapper->add('StartDate', 'sonata_type_datetime_picker', 
> array(*
> *            'label' => 'Data de Inicio',*
> *            'format' => 'dd/MM/y HH:mm',*
> *        ));*
> *}*
>
> And in my database is defined as (in Postgres):
> *start_date timestamp(0) without time zone NOT NULL*.
>
> I would like to use Brazilian timezone.
> It´s necessary to use SonataIntlBundle? I´m searching, But I can not find 
> many details about how to use.
> For exemple, when I use this bundle the following error occurs in 
> configureShowFields:
> An exception has been thrown during the rendering of a template ("Unable 
> to create internal class: \IntlDateFormatter, with params: locale => pt_BR, 
> datetype => 2, timetype => -1, timezone => America/Sao_Paulo, calendar => 
> 1") in SonataIntlBundle:CRUD:show_date.html.twig at line 23.
>
> I appreciate your help ans request more information, please.
>
> Thank you,
> Aline.
>
> Em quarta-feira, 14 de setembro de 2016 05:52:56 UTC-3, 
> [email protected] escreveu:
>>
>> I had a similar issue with times.
>>
>> My input was sending the time with the timezone and on the database I was 
>> saving it as a datetime (without the timezone).
>>
>> Check the data type you are currently sending on your request, and how do 
>> you store it on the database.
>>
>> If you are using doctrine the datetime field with timezone is called 
>> *datetimetz*.
>>
>> Albert
>>
>>
>> On Tuesday, September 13, 2016 at 6:47:01 PM UTC+1, Aline Macena wrote:
>>>
>>> Hi,
>>>
>>>
>>> I cried a Admin Class in Sonata. It´s have a datetime field defined as 
>>> sonata_type_datetime_picker in configureFormFields.
>>> When the user input the following time: *1:00 PM* and the system are 
>>> recording as *4:00 PM*.
>>> How can I do to make the system save *1:00 PM*, please?
>>>
>>>
>>> Thank you,
>>> Aline.
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"sonata-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sonata-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to