Find your content:

Search form

You are here

Day Light Saving (DST) in salesforce


I just want to know whether salesforce internally uses DST. How can I check that? Any thoughts?

Attribution to: doga

Possible Suggestion/Solution #1

All Datetime field values are stored in GMT internally. They are then adjusted automatically (on std page laouts) for display to match the users Timezone.

This is so that there is one uniform Timezone effective in the database layer and the (notional) controller adjusts this value to the users Timezone to display in the view (MVC)

So if you saved a record while DST was effective, it would display as that, but internally it would still store as GMT. (i.e. subtract one hour in addition to applying the Timezone correction to GMT)

Eg if I created a record at 9 AM in July (when DST is in use, i.e. GMT + 1) with the user timezone as United Kingdom, it would store 8 AM in the CreatedDate because it corrects to GMT by subtracting an hour.

If however I created that record in January when the UK is GMT, at 9 AM, the CreatedDate would store 9 AM, because that is the true GMT time.

If you want to store a time in GMT without the platform applying a correction, suffix the Datetime with Z, the Zulu, which tells it that this is the time in GMT. Eg 2012-11-15 T03:31.00.000Z

Attribution to: techtrekker

Possible Suggestion/Solution #2

No salesforce does not interally use DST. Things are stored in GMT and the display of the date/time are in the users settings on their profile.

The 'Locale' setting controls the date format: MM-DD-YYYY or DD-MM-YYYY for example.

Attribution to: Fifedog
This content is remixed from stackoverflow or stackexchange. Please visit

My Block Status

My Block Content