- Timestamp:
- 2011-04-18T19:39:15+12:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/src/java/org/greenstone/gsdl3/util/OAIXML.java
r23913 r23922 239 239 Element token_elem = (Element)tokens.item(i); 240 240 String expire_str = token_elem.getAttribute(EXPIRATION_DATE); 241 long datestamp = getTime(expire_str); 241 long datestamp = getTime(expire_str); // expire_str is in milliseconds 242 242 if(datestamp < System.currentTimeMillis()) { 243 243 resumption_token_elem.removeChild(token_elem); … … 360 360 361 361 public static long getTokenExpiration() { 362 return token_expiration*1000; 362 return token_expiration*1000; // in milliseconds 363 363 } 364 364 … … 520 520 /** get the string representation of a time from a long value(long type) 521 521 */ 522 public static String getTime(long seconds) {523 Date date = new Date( seconds);522 public static String getTime(long milliseconds) { 523 Date date = new Date(milliseconds); 524 524 SimpleDateFormat sdf = new SimpleDateFormat(granularity); 525 525 return sdf.format(date);
Note:
See TracChangeset
for help on using the changeset viewer.