Error in simpleTagProvider with DateTime tag

Hi @PGriffith,
I try to use a simpleTagProvider based on the ignition-sdk-examples

It works well, except with Datetime tag DataType.
I have an exception when I write in the tag from Ignition (7.9.9)

@Override
public Quality write(TagPath target, Object value) {
	Date val = TypeUtilities.toDate(value);


=> java.lang.ClassCastException: java.lang.String cannot be cast to java.util.Date
	
	ourProvider.updateValue(target.toStringFull(), val, DataQuality.GOOD_DATA);
	return CommonQualities.GOOD;
});

The exception makes it sound like you are trying to write a string value to the tag.

Have you tried converting the value that you want to write to java.util.Date?

I input the value from Ignition Designer.
The purpose of

TypeUtilities.toDate(value);

is to cast the value.
For my point of view, in the designer when you input the “date” value, a string is transmitted.

Your expectations are a bit unrealistic. String to date conversion is a quagmire that is left to the application programmer.

Is your string in one of the following date formats?
"yyyy-MM-dd", "MM/dd/yyyy", "MM/dd/yyyy HH:mm:ss", "hh:mm:ss a", "hh:mm a", "MM/dd/yyyy hh:mm:ss a", "yyyy-MM-dd HH:mm:ss.SSS", "yyyy-MM-dd HH:mm:ss", "EEE MMM dd HH:mm:ss z yyyy"

No,
when I edit the tag in the designer, I have something like : Wed Dec 05 16:29:05 CET 2018.

I have tried too :

import system
system.tag.write("[MyReplay]ControlTags/startDate",system.date.now())

and I have another error

Caused by: com.inductiveautomation.ignition.common.sqltags.parser.TagPathFormatException: Illegal character ']' (Line 1 , Char 10)