﻿#### 

In past Sitecore project we've discovered unexpected issue in the datetime field behavior. Our client organizes a lot of different events (like trainings and webinars) and some of them are planned for a year ahead.Once it occurred that many registered participants were one hour late for an event and were left disappointed as they were sure they came in time.

Why? OK, let’s add a couple of fields and set some date and time in future:

![Server time setting](https://www.brimit.com/-/media/images/blog/datetime1.png)

Looks nice, now let’s move into the future (e.g. 30 May 2017) and see what happens:

![Sitecore date setting](https://www.brimit.com/-/media/images/blog/datetime2.png)

Suddenly ‘Date field’ have different date (day before) and time has decreased for an hour! To understand this we need to remember how both date and datetime fields are stored in sitecore:

![sitecore date field](https://www.brimit.com/-/media/images/blog/datetime3.png)

Initially we selected 1 June in date field, but sitecore stores dates in UTC while displaying them in server time zone. That means it actually stores date different from the selected. And second thing in this situation is daylight saving shift. It is ‘winter time’ in February and Sitecore uses it to make UTC value from selected time and to restore field value from UTC. But after server time zone moves to ‘summer time’ difference between UTC and server time changes. And this floating difference will cause not only stored time change but even date.

What can we do? Main issue here appears when content author creates event in future in different location, where even daylight saving shift is different and what author really needs is just to set ‘3 PM local time’ and be sure it will stay ‘3 PM local time that day’. The simplest solution is to set sitecore setting ‘ServerTimeZone’ to UTC:

```
<setting name="ServerTimeZone" value="UTC"> 
```

That will force Sitecore to show actual stored datetime and avoid floating behavior. Make sure you are using only UTC time in your code and beware that dates and times will be shifted in Sitecore after setting change.

##### Do you need help with your Sitecore project?

      ![](~/media/CD37043DFD1F491D8E92958A11959F75.ashx?la=en&amp;hash=D08B252DD3B41C09B588007541E5D22F)

   [VIEW SITECORE SERVICES](https://www.brimit.com/expertise/sitecore-cms)

###### Author

[!\[daniil_side2\](https://www.brimit.com/-/jssmedia/feature/blogs/authors/daniil_side2.jpg?h=180&amp;iar=0&amp;w=360&amp;hash=B759563CA3F35642FD513A79358CC84C)
Daniil Raschupkin
Sitecore Solution Architect](https://www.brimit.com/blog/author?authors=Daniil%20Raschupkin)

#### More on Sitecore

[!\[How Vercel Will Help You Save Effort When Deploying Sophisticated Sitecore Projects\](https://www.brimit.com/-/jssmedia/project/brimit/blog/2024/vercel_cover-image.png)
#Guides#How-toDXPE-commerce
##### How Vercel Will Help You Save Effort When Deploying Sophisticated Sitecore Projects
Optimize and accelerate the development and deployment of complex multisite Sitecore projects.
Alexei Vershalovich on July 17, 2024](https://www.brimit.com/blog/how-vercel-will-help-you-save-effort-when-deploying-sophisticated-sitecore-projects)

[!\[Training Up Tomorrow's Sitecore MVPs: a Mentoring Success Story\](https://www.brimit.com/-/jssmedia/project/brimit/blog/2023/sitecore-mentoring---cover-image.png)
#How-toDXP
##### Training Up Tomorrow's Sitecore MVPs: a Mentoring Success Story
How to participate in the Sitecore Mentor program and help younger colleagues jump-start a career in Sitecore development.
Sergey Baranov on October 2, 2023](https://www.brimit.com/blog/training-up-tomorrows-sitecore-mvps)

[!\[Going Headless. Part 2: When a Headless CMS Is Your Best Bet (if you have Sitecore)\](https://www.brimit.com/-/jssmedia/project/brimit/blog/2022/headless/adobestock_456986731.jpg)
#How-toDXPE-commerce
##### Going Headless. Part 2: When a Headless CMS Is Your Best Bet (if you have Sitecore)
Discover how a headless CMS can benefit organizations that use Sitecore.
Daniil Raschupkin, Palina Trokhautsava on September 15, 2022](https://www.brimit.com/blog/going-headless-part-2-when-a-headless-cms-is-your-best-bet-if-you-have-sitecore)

![](https://bat.bing.net/action/0?ti=187017043&amp;tm=gtm002&amp;Ver=2&amp;mid=66b84f3f-287f-4f6b-b424-a1c66c224dba&amp;bo=2&amp;gtm_tag_source=1&amp;pi=0&amp;lg=en-US&amp;sw=800&amp;sh=600&amp;sc=24&amp;nwd=1&amp;tl=How%20to%20Display%20Sitecore%20Datetime%20Field%20Correctly%20for%20Multiple%20Timezones&amp;kw=sitecore,%20Datetime%20,%20timezone,%20field,%20display,%20UTC&amp;p=https%3A%2F%2Fwww.brimit.com%2Fblog%2Fhow-to-display-sitecore-datetime-field-timezone&amp;r=&amp;lt=348&amp;evt=pageLoad&amp;sv=2&amp;asc=D&amp;cdb=AQAY&amp;rn=335490)