Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

  1. #1
    Sencha Premium Member
    Join Date
    Oct 2011
    Location
    Duluth, MN
    Posts
    126
    Vote Rating
    4
    badgerb1 is on a distinguished road

      0  

    Default JSON encodeDate time zone

    JSON encodeDate time zone


    Is there a reason that the timezone or at least the offset isn't included in the JSON encodeDate by default?

    Just curious if I'm missing something by overriding it since it's a global override.

    Thanks
    Bob

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,522
    Vote Rating
    814
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Code:
    Ext.JSON.encodeDate(new Date())
    returns

    Code:
    2012-05-28T09:03:30
    encodeDate method is:

    Code:
        this.encodeDate = function(o) {
            return '"' + o.getFullYear() + "-" 
            + pad(o.getMonth() + 1) + "-"
            + pad(o.getDate()) + "T"
            + pad(o.getHours()) + ":"
            + pad(o.getMinutes()) + ":"
            + pad(o.getSeconds()) + '"';
        };
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha Premium Member
    Join Date
    Oct 2011
    Location
    Duluth, MN
    Posts
    126
    Vote Rating
    4
    badgerb1 is on a distinguished road

      0  

    Default


    Right, I was just wondering why the timezone isn't in the default implementation? Seems like if you are using JSON you are likely transmitting it to somewhere and that somewhere would want the timezone included. I could see it if it was UTC(GMT) time so you could assume that but it's not.

    I just didn't want to override encodeDate to include timezone and then wind up messing up a bunch of things since it's a global function.

    Thanks
    Bob

  4. #4
    Sencha User
    Join Date
    Nov 2010
    Location
    Ukraine
    Posts
    11
    Vote Rating
    0
    NexusOne is on a distinguished road

      0  

    Default BUMP

    BUMP


    For my timezone (+0300):
    Code:
    JSON.stringify(new Date()) !== Ext.JSON.encodeDate(new Date())

    I found http://docs.sencha.com/extjs/4.2.0/s...hod-encodeDate

    Code:
    
    
        me.encodeDate = function(o) {
            return '"' + o.getFullYear() + "-"
            + pad(o.getMonth() + 1) + "-"
            + pad(o.getDate()) + "T"
            + pad(o.getHours()) + ":"
            + pad(o.getMinutes()) + ":"
            + pad(o.getSeconds()) + '"';
        };
    You should use o.getUTC*** methods instead

Thread Participants: 2