Results 1 to 3 of 3

Thread: [4.1.1] data.Writer sends invalid timestamps to server!

    Success! Looks like we've fixed this one. According to our records the fix was applied for EXTJS-6826 in 4.1.2.
  1. #1

    Default [4.1.1] data.Writer sends invalid timestamps to server!

    Possibly related to:

    1. Any browser.
    2. Ext 4.1.1 (was working fine on Ext 4.0.x)
    3. A store with a proxy and a writer (tested with 'rest' and 'json' reader/writer, but that's actually irrelevant).
    4. A model with 1 or more fields defined as type: 'date', dateFormat: 'timestamp' (still valid per docs)
    5. When syncing store, writer sends garbled dates to server - i.e. "fooDate":"310007e0031am07p"
                for (f = 0; f < fLen; f++) {
                    field = fieldItems[f];
                    if (field.persist) {
                        name = field[nameProperty] ||;
                        value = record.get(;
                        if (field.serialize) {
                            data[name] = field.serialize(value, record);
                        } else if (field.type === && field.dateFormat) {
                            data[name] = Ext.Date.format(value, field.dateFormat);
                        } else {
                            data[name] = value;
    1. Reader accepts and understands dateFormat of "time" and "timestamp".
    2. Writer takes literal dateFormat and passes it to Ext.Date.format() which serializes to invalid, unreadable dates.
    Workaround for the impatient:

    // dateFormat: 'timestamp',  // replace with the one below:
    dateFormat: 'U'
    It's a Date.format equivalent of unix timestamp (!/api/Ext.Date)

    ps: guys, could I count on a discount for 1 dev pack if I sent you a patch and a test case ? :-)
    Last edited by Artur Bodera (Joust); 20 Jul 2012 at 12:20 AM. Reason: title

  2. #2
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Gainesville, FL
    Vote Rating


    I think the docs are just a little misleading. 'timestamp' and 'time' aren't valid values, the formats listed in Ext.Date are valid. The date being sent isn't garbled, it's thinking each letter is a different format. The ones that aren't formatted aren't valid.
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Frontend Engineer
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:

  3. #3


    Quote Originally Posted by mitchellsimoens View Post
    I think the docs are just a little misleading. 'timestamp' and 'time' aren't valid values,
    They are valid values, because they had been recognized by Reader since Ext 3. It's just Writer that doesn't support these tokens. We can either make Writer support them the same way Reader does, or drop them altogether (breaking BC) and rely on "U" instead.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts