public static int getLicenseTime()
{
try
{
String licensetime = com.chinawiserv.platform.SystemConfig.getOverTime();
if (licensetime == null || licensetime.equals(""))
{
return -1;
} else if (licensetime.equals("00000000"))
{
return Integer.MAX_VALUE;
} else
{
java.text.SimpleDateFormat dateFormat = new java.text.SimpleDateFormat("yyyyMMdd");
double dayc = (dateFormat.parse(licensetime).getTime() - System.currentTimeMillis()) / (double) (1000 * 60 * 60 * 24);
int day = (int) dayc;
if (dayc > 0)
{
day = day + 1;
}
return day;
}
} catch (Exception ex)
{
ex.printStackTrace();
}
return Integer.MAX_VALUE;
}