DEV Community

Kevin Cox
Kevin Cox

Posted on • Originally published at kevincox.ca on

Time Sharing in Instant Messaging

A seemingly-obvious feature that I haven’t seen in any instant messenger yet. I want to be able to share a timestamp in a way that can be computer-understood and presented to the user with a good UX.

For example, I want to say:

Let’s have a call about this at 11:30.

But that “11:30” is actually a rich object that encodes an exact timestamp. If your IM application uses HTML formatting for messages it may look something like this:

<time datetime=2024-07-05T11:30:00-04:00>2024-07-05 at 11:30</time>

The time is machine-readable (with some fallback text). Clients would show the users the time converted to their local time zone! Or maybe a relative time like “in 32 minutes” if they prefer. Maybe they can click it and see that time in their calendar, or see what time that is in different time zones. The possibilities are endless, but the most important thing is that the time is correct, because computers are much better at time math than humans are.

Right now I frequently see people just mention a local time and you need to have their time zone memorized (and know if and where they are travelling). If you are lucky they say something like “11:30 IST”, then you just need to guess if they mean Indian Standard Time or Irish Standard Time. Having a rich “timestamp” object in instant messages would be easier for both the sender and receiver.

Image of Datadog

The Essential Toolkit for Front-end Developers

Take a user-centric approach to front-end monitoring that evolves alongside increasingly complex frameworks and single-page applications.

Get The Kit

Top comments (0)

Sentry image

Hands-on debugging session: instrument, monitor, and fix

Join Lazar for a hands-on session where you’ll build it, break it, debug it, and fix it. You’ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good ol’ AI to find and fix issues fast.

RSVP here →

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay