
Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag storeYou're right to be surprised – there isn't a dedicated timezone plugin for Sanity, and that's because Sanity's datetime field doesn't actually store timezone information. It only stores UTC timestamps.
The allowTimeZoneSwitch and displayTimeZone options you might have seen in the datetime type only control how the datetime is displayed in the Studio UI – they don't capture or store which timezone an event actually belongs to. This is a common point of confusion.
For your use case (storing date + time + timezone), you'll need to create a custom solution. Here are two practical approaches:
Create a custom object type that combines a datetime field with a separate timezone field:
{
name: 'scheduledEvent',
type: 'object',
fields: [
{
name: 'datetime',
type: 'datetime',
title: 'Date and Time'
},
{
name: 'timezone',
type: 'string',
title: 'Timezone',
options: {
list: [
{title: 'Eastern Time', value: 'America/New_York'},
{title: 'Central Time', value: 'America/Chicago'},
{title: 'Mountain Time', value: 'America/Denver'},
{title: 'Pacific Time', value: 'America/Los_Angeles'},
{title: 'UTC', value: 'UTC'},
// Add more IANA timezone identifiers as needed
]
}
}
]
}This stores both pieces of information separately, which you can then combine in your frontend using libraries like date-fns-tz or luxon.
Alternatively, you could use a string field and store the complete ISO 8601 string with timezone offset (like 2024-03-15T14:30:00-04:00), but this requires more custom input handling in Studio.
The richDate plugin you mentioned was an attempt to improve the datetime input experience, but as you've discovered from the issues, it doesn't solve the timezone storage problem either. It's more focused on flexible date/time input formats than timezone handling.
Since this is a common need (events, scheduling, etc.), building a reusable custom object type like Option 1 is your best bet. You could even package it as a plugin and share it with the community – there's clearly a gap here that others would benefit from!
The key is understanding that Sanity gives you the primitives (datetime for the timestamp, string for the timezone identifier), but combining them into a cohesive "datetime with timezone" experience is something you'll need to implement in your schema design and potentially with a custom input component if you want a polished UI.
Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.
Content operations
Content backend


The only platform powering content operations
By Industry


Tecovas strengthens their customer connections
Build and Share

Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag store