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
alexsummersalexsummers 

How to use getUserInfoResult Time Zone

Good Day!

Does anybody here knows how to use the TimeZone property of the getUserInfoResult.

My problem is displaying the date and time applying the user's timezone...

Or the timezone property is just for information purposes?

Thanks in advance

DevAngelDevAngel

Hi alexsummers,

You should not need to worry about the time zone as far as putting data into salesforce.com and getting the data out correctly.  .NET sends the data in GMT (greenwich mean time) or universal date format with an offset that corresponds to the user's computer settings for time zone.

The service provides data the same way, but using the user's setting in salesforce.com as the time zone offset. 

 

alexsummersalexsummers

Hi Dave thanks for the reply,

I forgot to mention that  I use a database to display dates:

1. I store dates as UTC in the database

2. And I want to display the correct dates for my users according to their

respective timezones

 

Is this possible? Thanks again....

martsmarts

Hi,

I have created a web page, hosted on an external site, and called through a web link.  This page retrieves a date value (in UTC) from a local database for display.

My problem is that I cannot figure out a way to re-format this date (in UTC) to the user's local timezone (stored in the user's setting).

I would have liked to retain the consistency of displaying the dates in one timezone, whether on my page (using local data), or in the normal salesforce pages.

Please advise if there is a way to resolve this.

Thanks in advance.