This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] mauve testsuite sql Timestamp


Michael Koch wrote:

Am Samstag, 9. Oktober 2004 22:31 schrieb Andreas Tobler:

Hi all,

there is a bug in the mauve/gnu/testlet/java/sql/Timestamp test.

Doing this in a tclsh gives me the following:

% set time_c [clock format 1099999999 -format "%Y-%m-%d %H:%M:%S"]
2004-11-09 12:33:19

In the test we have a time of 06:33:19. So the equals always fails
for toString.


[snip]


Could anyone familar with mauve and cvs please check and if ok
commit ?


Tested with GCJ CVS Head from today and jamvm 1.2 + GNU classpath CVS from today. For both your patch made all tests pass.

Ok, as found last night, this only works for people like Michael and me who sit in the same timezone.


To make it work for everyone I tried to set a default timezone in the test, but I fail. I get it to work in a standalone test without mauve.
But not in this one.
What do I miss/what do I do wrong?


I do this just before I create a new timestamp:

    // Set a common timezone to get the same result everywhere.
    SimpleTimeZone stz = new SimpleTimeZone(0 * 3600, "GMT");
    TimeZone.setDefault(stz);

Andreas






Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]