none
Problem with datetime field RRS feed

  • Question

  • All, I am having problems with setting time in FIM. The default time set in FIM portal is eastern time(GMT -5). We have an external .Net portal which sends a datetime field to fim. Whenever the attribute is created in FIM, the value is changed to -4 hrs.For example,

    date set in .Net code : 4/16/2012

    When debugging, when the attribute is attached to fim object, I found that the date is 2013-01-16T00:00:00.000

    But in FIM, the value is showing as 4/14/2012 8:00:00 pm

    Please help! Thanks.

    Tuesday, April 16, 2013 8:38 PM

Answers

  • Hello,

    did you try to pass it as local time or utc time?

    Sylvain

    • Marked as answer by fim_sc Wednesday, April 17, 2013 3:45 PM
    Wednesday, April 17, 2013 1:21 PM
  • fim sc,

    Your dates confused me as year is one off and the days are two off.  However, going off your statement, "It is 4hrs less.", it indeed sounds like a UTC conversion issue.

    Basically, what you need at a high level is to import your time via advanced flow rule with an extension from the .NET source as UTC time.  The datetime value you import should look something like: 2013-01-16T04:00:00.000

    Note the "04" hour, instead of "00".  This will occur if you convert via the following code example:

    mventry.Item("expirationTime").Value = dtFileTime.ToUniversalTime().ToString("yyyy'-'MM'-'dd'T'HH':'mm':'ss'.000'")

    With the proper UTC time value in the metaverse, and the correct time zone selected in your portal configuration, it should display your time properly in the portal UI.

    Please let us know if there are any questions or any further details to assist.


    Regards, Jose Garza | MCP, MCSA:2003 | http://josetheadmin.blogspot.com

    Wednesday, April 17, 2013 3:37 PM

All replies

  • My scenarios do not meet yours exactly, but I talk about the datetime attribute in the following blog post:http://josetheadmin.blogspot.com/2013/03/fim-understanding-and-handling.html

    This may give you an idea of what to expect.  Hope this helps!


    Regards, Jose Garza | MCP, MCSA:2003 | http://josetheadmin.blogspot.com

    Tuesday, April 16, 2013 9:54 PM
  • Hi!

    FIM accepts the following date and time format.

    DateTimeFormat(HireDate,"yyyy-MM-ddTHH:mm:ss.000"

    Regards,


    M. Irfan

    • Proposed as answer by M.Irfan Wednesday, April 17, 2013 9:46 AM
    Wednesday, April 17, 2013 9:46 AM
  • Irfan,

    Eventhough the date passed to FIM is 2013-01-16T00:00:00.000, the date I see in FIM portal is 4/14/2012 8:00:00 pm. It is 4hrs less.

    Wednesday, April 17, 2013 1:02 PM
  • Hello,

    did you try to pass it as local time or utc time?

    Sylvain

    • Marked as answer by fim_sc Wednesday, April 17, 2013 3:45 PM
    Wednesday, April 17, 2013 1:21 PM
  • fim sc,

    Your dates confused me as year is one off and the days are two off.  However, going off your statement, "It is 4hrs less.", it indeed sounds like a UTC conversion issue.

    Basically, what you need at a high level is to import your time via advanced flow rule with an extension from the .NET source as UTC time.  The datetime value you import should look something like: 2013-01-16T04:00:00.000

    Note the "04" hour, instead of "00".  This will occur if you convert via the following code example:

    mventry.Item("expirationTime").Value = dtFileTime.ToUniversalTime().ToString("yyyy'-'MM'-'dd'T'HH':'mm':'ss'.000'")

    With the proper UTC time value in the metaverse, and the correct time zone selected in your portal configuration, it should display your time properly in the portal UI.

    Please let us know if there are any questions or any further details to assist.


    Regards, Jose Garza | MCP, MCSA:2003 | http://josetheadmin.blogspot.com

    Wednesday, April 17, 2013 3:37 PM
  • Thanks Jose_Garza. That one worked!
    Wednesday, April 17, 2013 3:45 PM
  • My pleasure! :)


    Regards, Jose Garza | MCP, MCSA:2003 | http://josetheadmin.blogspot.com

    Wednesday, April 17, 2013 3:48 PM