Menu

#7 sie import ignores dates

v2.1
closed-fixed
nobody
None
5
2018-03-13
2010-04-01
Anonymous
No

when importing sie files all dates will be todays date if your system locale isn't sweden,
to fix
change \importexport\sie\util\SIEIterator.java
import java.text.SimpleDateFormat;
public Date nextDate() {
String iValue = next();
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
if(iValue != null && iValue.length() == 8) {

iValue = iValue.substring(0,4) + '-' + iValue.substring(4,6) + '-' + iValue.substring(6,8);

try{
return formatter.parse(iValue);
}catch(ParseException ex){
ex.printStackTrace();
}
}
return new Date();
}

Discussion

  • Leif-Jöran Olsson

    • status: open --> closed-fixed
    • Group: --> v2.1
     
  • Leif-Jöran Olsson

    Thanks.

     

Log in to post a comment.