[
https://issues.apache.org/jira/browse/DERBY-5966?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13486901#comment-13486901
]
Knut Anders Hatlen commented on DERBY-5966:
-------------------------------------------
An alternative may be to store the timestamp in GMT, which would not be
affected by time zone changes.
It might be as simple as changing this code in SYSUSERSRowFactory.makeRow() from
/* 4th column is LASTMODIFIED (timestamp) */
row.setColumn( LASTMODIFIED_COL_NUM, new SQLTimestamp( lastModified
) );
to
/* 4th column is LASTMODIFIED (timestamp) */
SQLTimestamp universalModTime = new SQLTimestamp();
universalModTime.setValue(lastModified,
Calendar.getInstance(TimeZone.getTimeZone("GMT")));
row.setColumn( LASTMODIFIED_COL_NUM, universalModTime);
and in buildDescriptor() from
/* 4th column is LASTMODIFIED */
col = row.getColumn( LASTMODIFIED_COL_NUM );
lastModified = col.getTimestamp( new java.util.GregorianCalendar()
);
to
/* 4th column is LASTMODIFIED */
col = row.getColumn( LASTMODIFIED_COL_NUM );
lastModified =
col.getTimestamp(Calendar.getInstance(TimeZone.getTimeZone("GMT")));
> NativeAuthenticationServiceTest.testAll() failure: [ FILE, NATIVE
> authentication on, LOCAL authentication ON, Authentication/Authorization
> turned OFF, SecurityManager ON, Embedded ]: Connection to fifthDB
> unexpectedly failed.
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: DERBY-5966
> URL: https://issues.apache.org/jira/browse/DERBY-5966
> Project: Derby
> Issue Type: Bug
> Components: Test
> Affects Versions: 10.10.0.0
> Reporter: Knut Anders Hatlen
> Priority: Minor
>
> Saw these failures on multiple platforms around the time Europe switched from
> DST:
> http://dbtg.foundry.sun.com/derby/test/Daily/jvm1.5/testing/testlog/sles/1402814-suitesAll_diff.txt
> http://dbtg.foundry.sun.com/derby/test/Daily/jvm1.5/testing/testlog/sparc/1402814-suitesAll_diff.txt
> http://dbtg.foundry.sun.com/derby/test/Daily/jvm1.5/testing/testlog/vista/1402814-suitesAll_diff.txt
> 3)
> testAll(org.apache.derbyTesting.functionTests.tests.lang.NativeAuthenticationServiceTest)junit.framework.AssertionFailedError:
> [ FILE, NATIVE authentication on, LOCAL authentication ON,
> Authentication/Authorization turned OFF, SecurityManager ON, Embedded ]:
> Connection to fifthDB unexpectedly failed.
> at
> org.apache.derbyTesting.functionTests.tests.lang.NativeAuthenticationServiceTest.getConnection(NativeAuthenticationServiceTest.java:1604)
> at
> org.apache.derbyTesting.functionTests.tests.lang.NativeAuthenticationServiceTest.getConnection(NativeAuthenticationServiceTest.java:1570)
> at
> org.apache.derbyTesting.functionTests.tests.lang.NativeAuthenticationServiceTest.getConnection(NativeAuthenticationServiceTest.java:1564)
> at
> org.apache.derbyTesting.functionTests.tests.lang.NativeAuthenticationServiceTest.vetPasswordLifetime(NativeAuthenticationServiceTest.java:1385)
> at
> org.apache.derbyTesting.functionTests.tests.lang.NativeAuthenticationServiceTest.testAll(NativeAuthenticationServiceTest.java:618)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira