DateTime not supported in schema
See original GitHub issueWhen I use a DateTime type field in the schema, it throws an Expcetion System.ArgumentException: DateTime not supported
Sample c# code:
class MessageDate
{
public DateTime CreatedTime { get; set; }
}
[Fact]
public async Task SendMsg()
{
var producer = await Client.NewProducer(Schema.JSON<MessageDate>())
.Topic("schema")
.CreateAsync();
var consumer = await Client.NewConsumer(Schema.JSON<MessageDate>())
.Topic("schema")
.SubscriptionName("my-sub")
.SubscribeAsync();
var msg = new MessageDate {CreatedTime = DateTime.Today};
await producer.SendAsync(msg);
var cmsg = await consumer.ReceiveAsync();
var value = cmsg.GetValue();
Log.WriteLine(value.ToString());
}
Is it that DateTime cannot be used here? What is the best practice?
Issue Analytics
- State:
- Created 3 years ago
- Comments:27 (2 by maintainers)
Top Results From Across the Web
DateTime not supported in schema · Issue #9
When I use a DateTime type field in the schema, it throws an Exception: System.ArgumentException: DateTime not supported at AvroSchemaGenerator.
Read more >Validate datetime value using python jsonschema
The error is jsonschema.exceptions.SchemaError: 'datetime' is not valid under any of the given schemas . How can I validate this correctly?
Read more >Apollo iOS Swift DateTime Not Supported - Help
Hello Team, We are getting below issue when fetching datetime in graphQL Swift. Failure! Error: GraphQLResultError(path: delivery.nodes.0.
Read more >MySQL data type 'datetime' not supported when importing ...
When editing an imported / existing table or creating a new table the MySQL data type 'datetime' is not available in the type...
Read more >JSON schema validation does not validate date or time fields
The JSON schema validator in Mule Rutime 4 does not validate a date or time field.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@eaba Ok, I think we are good to go with that 😃
Checked. I will work on that