Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion common/src/main/java/com/genexus/LocalUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -796,6 +796,10 @@ private static boolean isNullTimeValue(String value, boolean isAMPM)
}
}

private static boolean isNullDateValue(String value) {
return value.equals("00/00/00") || value.equals("00/00/0000") || value.equals("0000/00/00");
}

public static void main(String arg[])
{
System.out.println(isNullDateTime(" / / 12 AM", 2, 1));
Expand Down Expand Up @@ -1091,7 +1095,7 @@ public Date ctotex(String date, int format)
{
//When parsing a date gives a ParseException we try with setLenient(true) to parse dates only with dates with
//daylighttime changes at 00:00 AM (Issue: 93038)
if (!isNullTimeValue(date.substring(date.indexOf(' ') + 1), false))
if (date.indexOf(' ') == -1 || !isNullTimeValue(date.substring(date.indexOf(' ') + 1), false) && !isNullDateValue(date.substring(0, date.indexOf(' '))))
return null;
df.setLenient(true);
try
Expand Down
Loading