Time in: 10:00 p.m. on 03/10/2007 at CST Time out: 05:00 a.m. on 03/11/2007 at CDT - because daylight start in 2007 on this date Hours worked differnce is comming 7 hours. Acaually it should be 6 hours, since at 2 a.m. on 03/11/2007 time changes to 1 a.m.. This problem is also when vice versa (when daylight time changes back to non-daylight savings) I mean the difference is 7 hours, but actually it should be 8 hours. Any help?????
- Posted by: Muhammad Irshad
- Posted on: May 01 2007 13:25 EDT
- Re: Problem when computing time difference when daylightTime changes by Nicke G on May 02 2007 03:01 EDT
- Re: Problem when computing time difference when daylightTime changes by Muhammad Irshad on May 03 2007 09:48 EDT
You must use the underlying millisecond (Date.getTime()) representation to evaluate true elapsed time. Then re-work the millisecond time difference into hours and minutes. /Niklas
It worked. Many thanks.