Ergebnis 1 bis 7 von 7

Thema: Format timestamp attribute

  1. #1
    Contao-Nutzer Avatar von Paolob
    Registriert seit
    29.12.2011.
    Beiträge
    23

    Standard Format timestamp attribute

    Hi,
    i have update my MetaModels to TNG version.

    I have a timestamp filed on my application.
    If I insert a new record or update a record, I have this error:
    DateTime::__construct(): Failed to parse time string (24/05/2014) at position 0 (2): Unexpected character

    The date is 24/05/2014

    In Contao the date format is d/m/Y
    if the date is similar to 05/10/2013, the error is not present
    I think it's a problem with the date format.
    Paolo B.
    Contao ambassador
    ContaoCms.it - Sito di riferimento per la comunità italiana

  2. #2
    Contao-Nutzer Avatar von timbec
    Registriert seit
    22.09.2009.
    Ort
    Aachen
    Beiträge
    150
    Partner-ID
    7828
    User beschenken
    Wunschliste

  3. #3
    Contao-Nutzer Avatar von Paolob
    Registriert seit
    29.12.2011.
    Beiträge
    23

    Standard

    I'm sorry, I did not understand the answer.

    I wrote in the forum because the report had not yet been handled.
    Paolo B.
    Contao ambassador
    ContaoCms.it - Sito di riferimento per la comunità italiana

  4. #4
    Contao-Yoda Avatar von MacKP
    Registriert seit
    15.06.2009.
    Ort
    Duisburg
    Beiträge
    13.292
    User beschenken
    Wunschliste
    Contao-Projekt unterstützen

    Support Contao

    Standard

    This was just a mention for us from timbec. So we knew that there is an ticket and a thread for this issue.

    I'm sorry that i can't help you at the Moment. It looks like an Bug, so you will have to wait for an bugfix ore you can go into the code and fix in for yourselve and give us an PR for that ^^

    regards
    Contao Pool | C-C-A | MetaModels | [Internetseite -> Mediendepot Ruhr]
    [Arbeitet bei -> Paus Design & Medien]
    "I can EXPLAIN it to you, but I can't UNDERSTAND it for you."

  5. #5
    Contao-Nutzer Avatar von Paolob
    Registriert seit
    29.12.2011.
    Beiträge
    23

    Standard

    OK, thanks MacKP
    Paolo B.
    Contao ambassador
    ContaoCms.it - Sito di riferimento per la comunità italiana

  6. #6
    Contao-Nutzer Avatar von Paolob
    Registriert seit
    29.12.2011.
    Beiträge
    23

    Standard

    I did a test.
    I changed the format of the date in d-m-Y and now it works.
    It seems to be the character /
    Paolo B.
    Contao ambassador
    ContaoCms.it - Sito di riferimento per la comunità italiana

  7. #7
    Contao-Nutzer Avatar von chibineko
    Registriert seit
    02.06.2011.
    Beiträge
    120
    Partner-ID
    6306

    Standard

    Update the ticket, thanks for the information.

    I think the main problem is that the attribute class just use the date class from php without the format of the date.
    So the class didn't know how to tranform the string to a date.

Aktive Benutzer

Aktive Benutzer

Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1)

Lesezeichen

Lesezeichen

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein
  •