Urgent.News

What's breaking now, across thousands of outlets.

Tech

Store Timestamps in UTC, Display Them Locally

A CRM stores '10:30' beside a follow-up task. One representative reads it in Jaipur and another in London. Neither knows which timezone the value represents. Time data needs to describe either an instant or a local scheduling intention. Those are different requirements. Store instants unambiguously An enquiry acceptance time is an instant. Store it using a timezone-aware database type or an…

Store timestamps using UTC format and display them according to the user's local timezone for clarity. Store the time of an event as an instant, not a local scheduling time. For example, record an enquiry's acceptance time using a timezone-aware database type or an explicit UTC ISO string. Test for different timezones, month and year boundaries, daylight-saving transitions, and absent timezone settings to ensure accurate record-keeping.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

More from Tuesday 10 November →