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.

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Ext JS Premium Member christocracy's Avatar
    Join Date
    Oct 2006
    Location
    Montreal
    Posts
    381
    Vote Rating
    0
    christocracy is on a distinguished road

      0  

    Default [CLOSED-34] [3.x/2.x] Ext.form.TimeField and Daylight Saving switch

    [CLOSED-34] [3.x/2.x] Ext.form.TimeField and Daylight Saving switch


    Not sure if this is an ext bug yet. this is super-wonky.

    when daylight-saving time kicked in, my Ext.form.TimeField are stuck in an infinate loop at initComponent.

    Browser is giving me the "A script is taking longer than usual to execute" line. I tried restarting my machine, but it didn't fix it.

    I'm on Ubuntu 7.10 and I can only confirm this on FF 2.0.0.12

    I'm cycling through the while loop with debugger (see code, where I've noted)

    min: Sun Mar 09 2008 01:30:00 GMT-0500 (EST)
    max: Sun Mar 09 2008 23:59:00 GMT-0400 (EDT)

    min time cycles infinitely like so: |1:00, 1:15, 1:30, 1:45, 1:00, 1:15, 1:30,1:45...|

    I'll play with this a bit more.

    Code:
    initComponent : function(){
            Ext.form.TimeField.superclass.initComponent.call(this);
    
            if(typeof this.minValue == "string"){
                this.minValue = this.parseDate(this.minValue);
            }
            if(typeof this.maxValue == "string"){
                this.maxValue = this.parseDate(this.maxValue);
            }
    
            if(!this.store){
                var min = this.parseDate(this.minValue);
                if(!min){
                    min = new Date().clearTime();
                }
                var max = this.parseDate(this.maxValue);
                if(!max){
                    max = new Date().clearTime().add('mi', (24 * 60) - 1);
                }
                var times = [];
    
                while(min <= max){  // <---------------------------- Infinate loop here
                    times.push([min.dateFormat(this.format)]);
                    min = min.add('mi', this.increment);
                }
    
                this.store = new Ext.data.SimpleStore({
                    fields: ['text'],
                    data : times
                });
                this.displayField = 'text';
            }
        },

  2. #2
    Ext JS Premium Member christocracy's Avatar
    Join Date
    Oct 2006
    Location
    Montreal
    Posts
    381
    Vote Rating
    0
    christocracy is on a distinguished road

      0  

    Default it's a bug.

    it's a bug.


    following is incrementing time by 15min (just as TimeField does to load its store). look what happens when it hits 1:45 -- it jumps *back* to 1:00. shouldn't it have jumped *ahead* to 3:00, since this is daylight-saving?

    If you have an Ext.form.TimeField with default minValue / maxValue in your code, your app might be toast until Mar 10 rolls around.

    Code:
    >>> m = new Date().clearTime();
    Sun Mar 09 2008 00:00:00 GMT-0500 (EST)
    >>> m = m.add('mi', 15);
    Sun Mar 09 2008 00:15:00 GMT-0500 (EST)
    >>> m = m.add('mi', 15);
    Sun Mar 09 2008 00:30:00 GMT-0500 (EST)
    >>> m = m.add('mi', 15);
    Sun Mar 09 2008 00:45:00 GMT-0500 (EST)
    >>> m = m.add('mi', 15);
    Sun Mar 09 2008 01:00:00 GMT-0500 (EST)
    >>> m = m.add('mi', 15);
    Sun Mar 09 2008 01:15:00 GMT-0500 (EST)
    >>> m = m.add('mi', 15);
    Sun Mar 09 2008 01:30:00 GMT-0500 (EST)
    >>> m = m.add('mi', 15);
    Sun Mar 09 2008 01:45:00 GMT-0500 (EST)
    >>> m = m.add('mi', 15);
    Sun Mar 09 2008 01:00:00 GMT-0500 (EST)
    >>> m = m.add('mi', 15);
    Sun Mar 09 2008 01:15:00 GMT-0500 (EST)

  3. #3
    Ext User
    Join Date
    Jul 2007
    Posts
    10
    Vote Rating
    0
    FXetc is on a distinguished road

      0  

    Exclamation


    I'm getting the same thing! Using Firefox 2.0.0.12. As soon as it hit midnight my application would hang EVERY browser it was loaded to. (I'm on Windows Vista) I'm lucky I could temporarily remove the TimeField without losing major functionality.

  4. #4
    Ext User
    Join Date
    Jan 2008
    Posts
    33
    Vote Rating
    0
    rogerr is on a distinguished road

      0  

    Default it's a real bug

    it's a real bug


    it gets stuck in an infanite loop when trying to increment from 1:45 to 2am, but daylight savings causes it to go back to 1:00am instead.

    Here is a very quick fix you can add to your page(s) to at least stop the runaway looping, until a more correct fix is available from the good people at Ext.

    Code:
    Ext.override(Ext.form.TimeField, {
    	
        // cap the number of items in the drop down menu
        maxMenuItems: 100,
    	
        // private
        initComponent : function(){
            Ext.form.TimeField.superclass.initComponent.call(this);
    
            if(typeof this.minValue == "string"){
                this.minValue = this.parseDate(this.minValue);
            }
            if(typeof this.maxValue == "string"){
                this.maxValue = this.parseDate(this.maxValue);
            }
    
            if(!this.store){
                var min = this.parseDate(this.minValue);
                if(!min){
                    min = new Date().clearTime();
                }
                var max = this.parseDate(this.maxValue);
                if(!max){
                    max = new Date().clearTime().add('mi', (24 * 60) - 1);
                }
                var times = [];
                var maxItems = this.maxMenuItems; 
                while(min <= max && --maxItems >= 0){
                    times.push([min.dateFormat(this.format)]);
                    min = min.add('mi', this.increment);
                }
                this.store = new Ext.data.SimpleStore({
                    fields: ['text'],
                    data : times
                });
                this.displayField = 'text';
            }
        }
    });

  5. #5
    Sencha Premium Member
    Join Date
    Nov 2007
    Posts
    1
    Vote Rating
    0
    skyout is on a distinguished road

      0  

    Default Same Here - thanks for the quick fix

    Same Here - thanks for the quick fix


    Thanks for the quick fix.

  6. #6
    Ext User
    Join Date
    Feb 2008
    Location
    Berlin
    Posts
    2
    Vote Rating
    0
    thoriann is on a distinguished road

      0  

    Default Alternate workaround

    Alternate workaround


    Just hit the same bug. I worked around it (before finding this thread) by adding:

    Code:
    new Ext.form.TimeField({
    		minValue: Date.parseDate('01/10/2007 00:00:00', 'd/m/Y H:i:s'),
    		maxValue: Date.parseDate('01/10/2007 23:59:59', 'd/m/Y H:i:s')
    })
    in the TimeField configuration. I.e. do the store building using some random date. Then, make sure you discard the date when using the value.

    IMHO, this bug is serious, since it's causing the browser to hang while viewing the page. For a full day, once per year.

    P.S. As this was my first post to the forum (sorry that was on a bug), I wish to congratulate the Ext team on the outstanding library. Thank you!

  7. #7
    Ext User Sliver's Avatar
    Join Date
    Mar 2007
    Posts
    17
    Vote Rating
    0
    Sliver is on a distinguished road

      0  

    Default


    I just hit the same bug with the French daylight saving switch !
    Thanks for the little fix, it avoids 2 day per year of total extjs-timefield-black-out !

    May Jack or anyone else competent include this fix to the next version of Ext ?

  8. #8
    Sencha User
    Join Date
    Apr 2012
    Location
    Austin, Texas
    Posts
    2
    Vote Rating
    0
    brian.moeskau is an unknown quantity at this point

      0  

    Default


    Thanks, we'll get it fixed soon.

  9. #9
    Ext User
    Join Date
    Feb 2008
    Location
    Berlin
    Posts
    2
    Vote Rating
    0
    thoriann is on a distinguished road

      0  

    Default A slightly better solution

    A slightly better solution


    Hi, just trying to help here. Another possible solution would be:

    Code:
    Ext.override(Ext.form.TimeField, {
    	initComponent : function(){
    		Ext.form.TimeField.superclass.initComponent.call(this);
    
    		if(typeof this.minValue == "string"){
    			this.minValue = this.parseDate(this.minValue);
    		}
    		if(typeof this.maxValue == "string"){
    			this.maxValue = this.parseDate(this.maxValue);
    		}
    
    		if(!this.store){
    			var min = this.parseDate(this.minValue);
    			if(!min){
    				min = new Date().clearTime();
    			}
    			var max = this.parseDate(this.maxValue);
    			if(!max){
    				max = new Date().clearTime().add('mi', (24 * 60) - 1);
    			}
    			var times = [];
    			while(min <= max){
    				times.push([min.dateFormat(this.format)]);
    				var next_min = min.add('mi', this.increment);
    				if (next_min < min) {
    					// DST change detected. Trying to go over it.
    					next_min = next_min.add("mi", 120);
    				}
    				min = next_min;
    			}
    			this.store = new Ext.data.SimpleStore({
    				fields: ['text'],
    				data : times
    			});
    			this.displayField = 'text';
    		}
    	}
    });
    With this, the combo will not display the 2:00 hour, which is actually correct. It will not work if the DST is larger than 1 hour (does this ever happen?).

  10. #10
    Sencha User
    Join Date
    Apr 2012
    Location
    Austin, Texas
    Posts
    2
    Vote Rating
    0
    brian.moeskau is an unknown quantity at this point

      0  

    Default


    The TimeField is not and cannot be DST-aware. Coding for DST is tricky business since it is locale-specific and year-specific. If your app requires true DST handling, it's up to you to provide the appropriate validation that checks validity of times given the DST requirements of your application (I've done this myself in the past using a huge iCal-format file of DST data). Of course the looping bug must be fixed, but the best we can really do is always generate a consistent set of time values, even on DST dates.

    So the solution I came up with is simply to always generate times based off of a static, safe date rather than relying on the current user local date. That way you'll be assured that times will always be generated consistently. Here's the patch (this is already in SVN):

    Code:
    Ext.override(Ext.form.TimeField, {
    
        // private - This is the date to use when generating time values in the absence of either minValue
        // or maxValue.  Using the current date causes DST issues on DST boundary dates, so this is an 
        // arbitrary "safe" date that can be any date aside from DST boundary dates.
        initDate: '1/1/2008',
    
        initComponent : function(){
            Ext.form.TimeField.superclass.initComponent.call(this);
    
            if(typeof this.minValue == "string"){
                this.minValue = this.parseDate(this.minValue);
            }
            if(typeof this.maxValue == "string"){
                this.maxValue = this.parseDate(this.maxValue);
            }
    
            if(!this.store){
                var min = this.parseDate(this.minValue);
                if(!min){
                    min = new Date(this.initDate).clearTime();
                }
                var max = this.parseDate(this.maxValue);
                if(!max){
                    max = new Date(this.initDate).clearTime().add('mi', (24 * 60) - 1);
                }
                var times = [];
                while(min <= max){
                    times.push([min.dateFormat(this.format)]);
                    min = min.add('mi', this.increment);
                }
                this.store = new Ext.data.SimpleStore({
                    fields: ['text'],
                    data : times
                });
                this.displayField = 'text';
            }
        }
    });