« Introduction to XRM Video From WPC | Main | CRM 4.0 Performance »

July 17, 2009

TrackBack

TrackBack URL for this entry:
http://www.typepad.com/services/trackback/6a00e54fb34b6f883301157210db2d970b

Listed below are links to weblogs that reference Date Only fields display different dates for users in different Time Zones:

Comments

Christian

I am glad, that somebody sees this as well as a problem. I've been in different discussions with Microsoft and they are claiming, that it is used as designed. As we are in working in different time zones around the globe and do have a lot of date only fields, we do often have the problem. I am claiming this as a bug. I am seeing different work arounds, but everyone of those has got its own implications and shortcomings.

Scott Sewell

Christian - Thanks for the feedback.

I see where you've added your suggestion to the microsoft connect suggestion box - (I didn't see it earlier) - I've added a comment and validated that it happens for me too -

Hopefully others who have experienced this, will chime in and raise the profile of this item.

(https://connect.microsoft.com/dynamicssuggestions/feedback/ViewFeedback.aspx?FeedbackID=471412)

David Withers

wow I had to use a trigger to get around this, I know unsupported. Now I can remove the trigger. What's even more funny is I just posted this on the forums a few days ago. I love your blog!

Chris Condron

Wouldn't setting the time to noon GMT fix thew problem?
i.e. for someone in New York set it to 7 am (because EST is GMT -5)
That way when you cross the date line you also cross midnight making it work in New York & Sydney.
-Chris

Scott Sewell

Chris - you're correct that setting to noon GMT would minimize the confusion - The problem would still exist for one timezone in the pacific, but it's a safe bet I won't have users there. :)

The effort here was trying the least-complex workaround for updating lots of fields across a couple of dozen entities in use. (I know the time could be adjusted via triggers/direct SQL but didn't want to go down that path.) - And unfortunately I wasn't able to find a way to determine the user's GMT off-set in the script.

I'm always looking for better ways to solve the problem - How did you approach it?

John Hoven

To do this by script and get the user's GMT off-set in script you'll need to extract the Date portion of the date time. Then make a call to the CRM Web Service (LocalTimeFromutcTime) passing in the date the user entered as:
yyyy-MM-DDT112:00:00 Z

This way the web service will transform from 12pm UTC into the user's local time and it uses the often hotfixed and maintained versions of the CRM timezone definitions to do the transformation.

Of course this only is set if the value is set by the CRM form (not web service calls and workflows). What we do is something similar to http://www.patrickverbeeten.com/pages/ContentItemPage.aspx?id=12&item=86&p=true which takes any date on a create or update and replaces it with a 12 Noon UTC value. It ended up that all we needed was a slightly modified version of the Create/Update Pre plugin.

John Hoven

We decided to host our plugin on codeplex for anyone else who is interested.

http://mhdateplugin.codeplex.com/

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been saved. Comments are moderated and will not appear until approved by the author. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment

Comments are moderated, and will not appear until the author has approved them.

Search The Blog

  • Search the Blog
     

    WWW
    this blog

Twitter Updates

    follow me on Twitter