Tony, I can pass the testcase successfully by using Sun's JRE 1.6. I'm not sure why it fails on your platform. Do you use JRE 1.6 or previous version? As you said, I would reset the default timezone in my patch. Thanks.
2008/8/29 Tony Wu <[EMAIL PROTECTED]> > I run the testcase and found that it failed on RI. can you tell us why > RI returns MDT rather than MST even if we explicitly set the default > timezone to MST? Is it a non-bug difference? > And please reset the default timezone to the original one after > running your testcase otherwise it may have side effect to other > tests. > > On Wed, Aug 27, 2008 at 6:04 PM, Jim Yu <[EMAIL PROTECTED]> wrote: > > Good idea. I've revised my patch and attached it to the JIRA again. > Thanks, > > Alexey. > > > > 2008/8/27 Alexey Petrenko <[EMAIL PROTECTED]> > > > >> I would suggest to change toDayOfWeek and toMonth methods to simple > >> static arrays. We do not need these calls and switches in this case. > >> > >> Thanks in advance. > >> > >> SY, Alexey > >> > >> 2008/8/27 Jim Yu <[EMAIL PROTECTED]>: > >> > Hi all, > >> > > >> > I took a look at [1] and found that we can remove the delegation to > >> > SimpleDateFormat since we only use the en-us locale here. > >> > I think we can easily implement this method instead of delegating to > >> > SimpleDateFormat. Then, this defect can be easily resolved. > >> > Moreover, invoking SimpleDateFormat will lead to low performance of > this > >> > API. For a simple testcase as below [2], the original > >> > result is 119667 millisecs while the result after applying my patch is > >> only > >> > 1140 millisecs. I've attached my patch to this JIRA. > >> > Is there anyone to verify the patch? Thanks. > >> > > >> > [1] https://issues.apache.org/jira/browse/HARMONY-5468 > >> > [2] > >> > import java.util.Date; > >> > > >> > public class DateToStringTest { > >> > > >> > public static void main(String[] args) { > >> > long start = System.currentTimeMillis(); > >> > Date date = new Date(); > >> > long count = 100000; > >> > System.out.println(date.toString()); > >> > while(--count != 0) { > >> > date.toString(); > >> > } > >> > System.out.println(System.currentTimeMillis() - start); > >> > } > >> > } > >> > -- > >> > Best Regards, > >> > Jim, Jun Jie Yu > >> > > >> > China Software Development Lab, IBM > >> > > >> > > > > > > > > -- > > Best Regards, > > Jim, Jun Jie Yu > > > > China Software Development Lab, IBM > > > > > > -- > Tony Wu > China Software Development Lab, IBM > -- Best Regards, Jim, Jun Jie Yu China Software Development Lab, IBM
