function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
andersalandersal 

Problem in getting right time from Date/Time field

Hi!

 

I am struggling to get the right time (hh:mm) from a Date/Time field. I get the GMT time and not the time in my timezone(in Norway). I wonder why it isn't showing the actual value entered in the field(It is the Start time in event object) Why should it give me the GMT time in VisualForce?? Is there anybody who can help me here?

 

Regards

 

Anders

krishnagkrishnag

check your company time zone setting. administration setup-->companyporfile-->company information

SatgurSatgur

Anders,

 

Can you go to your USER detail record in SFDC and check what is the TIMEZONE marked against your user record?

 

Salesforce always stores the date/time information in UTC format (GMT) in repository. But while displaying the same, it looks at the timezone which user belongs to and converts it accordingly.

 

So if you can check if your User record has correct Timezone specification. If that is the case, I believe you should not have problems while viewing the details on screen.

 

- Satgur