File tree Expand file tree Collapse file tree
main/java/org/cipres/treebase/auxdata
test/java/org/cipres/treebase/auxdata Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11
22
3-
43package org .cipres .treebase .auxdata ;
54
65import java .text .ParseException ;
1312import java .util .List ;
1413import java .util .Map ;
1514import java .util .Set ;
15+ import java .util .TimeZone ;
1616
1717import org .cipres .treebase .domain .TBPersistable ;
1818import org .cipres .treebase .domain .matrix .Matrix ;
@@ -372,6 +372,7 @@ public Date getCreationDate() {
372372 }
373373 try {
374374 SimpleDateFormat ds = new SimpleDateFormat ("M/d/yy KK:mm:ss" );
375+ ds .setTimeZone (TimeZone .getTimeZone ("EST" ));
375376 return ds .parse (creationDateString );
376377 } catch (ParseException e ) { /* ignore it */ }
377378 return null ;
Original file line number Diff line number Diff line change 66import java .io .IOException ;
77import java .io .UnsupportedEncodingException ;
88import java .net .URISyntaxException ;
9+ import java .text .DateFormat ;
10+ import java .text .SimpleDateFormat ;
911import java .util .Collection ;
1012import java .util .Date ;
1113import java .util .HashSet ;
1214import java .util .Iterator ;
1315import java .util .Map ;
1416import java .util .Set ;
17+ import java .util .TimeZone ;
1518
1619import junit .framework .TestCase ;
1720
@@ -156,10 +159,9 @@ public void testGetCreationHistorySection() {
156159
157160 public void testGetCreationDate () {
158161 Date d = aux .getCreationDate ();
159- // DateFormat df = new SimpleDateFormat("dd MMM yyyy hh:mm:ss zzz");
160- // df.setTimeZone(TimeZone.getTimeZone("GMT"));
161- // assertEquals("28 Jan 1996 19:14:16 GMT", df.format(d));
162- assertEquals ("28 Jan 1996 19:14:16 GMT" , d .toGMTString ());
162+ DateFormat df = new SimpleDateFormat ("dd MMM yyyy HH:mm:ss zzz" );
163+ df .setTimeZone (TimeZone .getTimeZone ("GMT" ));
164+ assertEquals ("28 Jan 1996 19:14:16 GMT" , df .format (d ));
163165 }
164166
165167 public void testSkip () {
You can’t perform that action at this time.
0 commit comments