none
Time Difference between portal and crm server

    Question

  • i have depoly the portal in crm 2011. In portal view case i have added the created on field. but the problem is my portal created on time and crm server actual created time having difference(2 hrs). What may be the problem.

    Ravin Singh D

    Thursday, October 17, 2013 3:07 AM

Answers

  • foreach (TableCell cell in e.Row.Cells)
     {
      DateTime cellAsDateTime;
      if (DateTime.TryParse(cell.Text, out cellAsDateTime))
       {
       cell.Text = cellAsDateTime.ToLocalTime().ToString("g");
       }
     }
    This is the code present on my grid list on bound event. I have just remove the code now it's working fine. but i don't what the purpose of this code. any way my problem solved after remove this. Thanks for your reply Ramesh..

    Ravin Singh D

    • Marked as answer by Ravin Singh Thursday, October 17, 2013 9:49 AM
    Thursday, October 17, 2013 9:49 AM

All replies

  • Hi Ravin,

    There are two time zones that may effect you timings.


    1. Server time zone

    2. CRM User settings time zone.

    3. Check the time zone offset of server time zone and user settings time zone.

    4. CreatedOn in crm(UTC) = time of server (- GMT offset of server)

    Created on in crm (Local) = UTC time (+ GMT offset of user's setting)

    5. Portal time = server time.

    Regards,

    Rameshwari

    [Kindly mark my answer as [Mark as Helpful] or [Vote as Answer] if the above explanation answers you question

    • Proposed as answer by RameshwariSah Thursday, October 17, 2013 9:05 AM
    Thursday, October 17, 2013 9:05 AM
  • 1 more point to consider:

    When you convert created on in crm (Local) you will find 1 hr difference from the expected time.

    Regards,

    Rameshwari

    • Proposed as answer by RameshwariSah Thursday, October 17, 2013 9:07 AM
    Thursday, October 17, 2013 9:07 AM
  • foreach (TableCell cell in e.Row.Cells)
     {
      DateTime cellAsDateTime;
      if (DateTime.TryParse(cell.Text, out cellAsDateTime))
       {
       cell.Text = cellAsDateTime.ToLocalTime().ToString("g");
       }
     }
    This is the code present on my grid list on bound event. I have just remove the code now it's working fine. but i don't what the purpose of this code. any way my problem solved after remove this. Thanks for your reply Ramesh..

    Ravin Singh D

    • Marked as answer by Ravin Singh Thursday, October 17, 2013 9:49 AM
    Thursday, October 17, 2013 9:49 AM
  • Hi,

    Same issue i am facing. On Customer portal website, events shows 1 hour difference from the time entered in CRM.

    what i can do to resolve this?

    urgent reply is appreciated please


    raj

    Tuesday, October 22, 2013 3:01 AM
  • Where i can find the code mentioned

    foreach (TableCell cell in e.Row.Cells)
    {
     
    DateTime cellAsDateTime;
     
    if (DateTime.TryParse(cell.Text, out cellAsDateTime))
      
    {
       cell
    .Text = cellAsDateTime.ToLocalTime().ToString("g");
      
    }
    }


    raj

    Tuesday, October 22, 2013 3:03 AM
  • Hi Raj,

    In view case page you can see the code. but in my portal i have two hours time difference. so once again confirm this solution is ok for you .


    Ravin Singh D

    Tuesday, October 22, 2013 7:39 AM
  • Hi Ravin

    Thanks. But i am facing problem right now with Events. Whatever time I entered in crm, it display the 1 hour difference because this is the standard difference between UTC and GMT timezone.

    Time in Event

    Time in Website

    Can you help me to sort out this problem?


    raj


    Tuesday, October 22, 2013 8:33 PM
  • Hi Raj

    sorry I am not at all working with events in portal.


    Ravin Singh D

    Wednesday, October 23, 2013 5:48 PM