Skip to content

Conversation

@alexey-sveshnikov
Copy link

@alexey-sveshnikov alexey-sveshnikov commented Nov 1, 2021

Hi Magnus!

I added %F format option to display timestamps in human-readable format.

I suggest a format that is compatible with both ISO8601 and RFC3399: 2021-11-01T23:04:35.113+0300.

Closes #189. Some code is borrowed from #216.

UPD: I see the failed CI job, going to check it later

Copy link
Owner

@edenhill edenhill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great stuff! Left some minor comments.

@alexey-sveshnikov alexey-sveshnikov force-pushed the human-readable-timestamps branch from 863e023 to e640afd Compare January 22, 2022 20:05
@alexey-sveshnikov alexey-sveshnikov force-pushed the human-readable-timestamps branch from e640afd to 39b459a Compare January 22, 2022 20:30
char buf[80];
format_timestamp(buf,
sizeof(buf),
rd_kafka_message_timestamp(rkmessage,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to check that tstype is valid, on older brokers (or message format versions) the tstype will be NONE and the timestamp unusable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Show message timestamp as UTC ISO8601 format

2 participants