Closed Bug 477136 Opened 15 years ago Closed 14 years ago

Date object not incrementing its hour properly in certain time zones

Categories

(Tamarin Graveyard :: Virtual Machine, defect)

x86
All
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED DUPLICATE of bug 606478
Future

People

(Reporter: jodyer, Assigned: rwinchel)

References

Details

Steps to reproduce:
1. Run the attached sample with time zone as IST (GMT + 5.30). Text boxes show 1 and 2.
2. Run the attached sample with time zone as PST (GMT - 8) with automatic adjust of Day light savings checked. Text boxes show 1 and 1.
3. Run the attached sample with time zone as PST (GMT - 8) with automatic adjust of Day light savings unchecked. Text boxes show 1 and 2.
 
 Actual Results:
 Showing different results for different time zones
 
 Expected Results:
 Should show same result irrespective of time zone
 
 Workaround (if any):
 None.
 
 Unchecking the automatic adjustment works only for some time zones but not for all
 
 
Transferred Comments:

Deeptika Gottipati - Mon Mar 24 04:47:36 CDT 2008
This issue causes FLEXDMV-1690

Jose Luis Silva - Mon Jun 02 12:14:00 CDT 2008
This issue CAUSES the FLEXDMV-1690 error because the suggested workaround for FLEXDMV-1690 isn't suitable when the automatic adjustment is needed (the option of unchecking is not an option).

Brent Baker - Wed Jun 04 10:41:42 CDT 2008
var d:Date = new Date(2008,2,9,1,23,0,0);
trace(d);
trace("before: " + d.hours.toString());
d.hours = d.hours + 1;
trace(d);
trace("after: " + d.hours.toString());


I don't understand why daylight savings should effect adjusting the date by one hour. Note that adjusting by >1 hour does not have the same behavior. Adding 2 hours is not effected by having daylight savings enabled/disabled.

Jose Luis Silva - Wed Jun 04 11:02:39 CDT 2008
If you use daylight savings and you add 1 hour to a date where the DST is going to be adjusted (2008-30-03 00:00), the result is the same date and not the date with the adusted DST.

Example: If you add 1 hour to "2008-30-03 00:00", the result should be:
- "2008-30-03 01:00", with Automatic adjust of DST deactivated (Flex has the correct behaviour in this case)
- "2008-30-03 02:00", with Automatic adjust of DST activated (Flex has an incorrect behaviour in this case, it returns "2008-30-03 00:00").

To workaround your example you should replace:
 d.hours = d.hours + 1;
With:
 d.hoursUTC = d.hoursUTC + 1;

Alan Carwile - Thu Jul 31 09:10:46 CDT 2008
We are hitting FLEXDMV-1690 in our project also.  That issue is at priority "C", while this issue (the apparent root cause) is at priority "None".  Does the priority of this issue need to be changed to help get the combination of issues fixed?
Thanks...Alan

Trevor Baker - Mon Aug 04 09:20:13 CDT 2008
Open to Erik for FP10

Trevor Baker - Tue Jan 27 14:51:56 CST 2009
back to internal review for reprioritization


This bug transferred from: http://bugs.adobe.com/jira/browse/ASC-3258
See also: bug 461758
Blocks: AS3_Builtins
Assignee: nobody → tharwood
Priority: -- → P3
Target Milestone: --- → flash10.1
Flags: flashplayer-needsversioning+
Target Milestone: flash10.1 → Future
Priority: P3 → --
Depends on: 535770
Reassigning to myself since I think this is related to bug 606478
Assignee: tharwood → rwinchel
This was a duplicate of 606478
Status: NEW → RESOLVED
Closed: 14 years ago
OS: Windows XP → All
Resolution: --- → DUPLICATE
bulk verifying resolved !fixed issues
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.