Dev123
Dev123

Reputation: 56

How to display records based on time for a particular TimeZone in web application

I have created a wcf which connects to crm and fetch records from crm. I have some date base filter condition,which filter records based upon date and time. If a user from US browse the application he should only see records based upon its timezone,similarly if user from India should only see records based upon Indian time. what all should be considered for creating such a functionality can anyone share some sample code

Thanks

Upvotes: 0

Views: 150

Answers (1)

Donal
Donal

Reputation: 32713

CRM stores datetimes at the UTC Time Zone in the database. When a user access data through CRM, the application will calculate the difference between the user's Time Zone and UTC and change the time as appropriate. When a user saves a datetime though the CRM application, the application will convert that to UTC and save it in the database. Therefore, CRM already does this for you - so you don't have to.

Upvotes: 2

Related Questions