W
Willy Dockx
Hello,
I run the following code once with setLenient(true) and once with
setLenient(false) on a Win2003 and on a WindowsXP machine
java.text.ParsePosition pos = new java.text.ParsePosition(0);
java.text.SimpleDateFormat formatter = new
java.text.SimpleDateFormat("dd/MM/yyyy HH:mm");
formatter.setLenient(true);
Date date = formatter.parse("02/04/2004 15:10", pos);
Calendar c = Calendar.getInstance();
c.setTime(date);
int hour = c.get(Calendar.HOUR_OF_DAY);
I get the following results :
Lenient false : on Windows XP hour = 15, on Windows 2003 hour = 16
Lenient true : on Windows XP hour = 15, on Windows 2003 hour = 15
Any idea why the hour on Windows2003 with lenient false is 16?
Thanks,
Greetings,
Willy Dockx
I run the following code once with setLenient(true) and once with
setLenient(false) on a Win2003 and on a WindowsXP machine
java.text.ParsePosition pos = new java.text.ParsePosition(0);
java.text.SimpleDateFormat formatter = new
java.text.SimpleDateFormat("dd/MM/yyyy HH:mm");
formatter.setLenient(true);
Date date = formatter.parse("02/04/2004 15:10", pos);
Calendar c = Calendar.getInstance();
c.setTime(date);
int hour = c.get(Calendar.HOUR_OF_DAY);
I get the following results :
Lenient false : on Windows XP hour = 15, on Windows 2003 hour = 16
Lenient true : on Windows XP hour = 15, on Windows 2003 hour = 15
Any idea why the hour on Windows2003 with lenient false is 16?
Thanks,
Greetings,
Willy Dockx