Is possible to change the year format in the Event Perspective ?

Hello,

We saw the events in the event perspesctive with the fomat MM/DD/YY, we want to see in the format MM/DD/YYYY.

 

We modified the language configuration in the browser but we only see changes in the MM and DD.

Is posible to see the year in four digits (YYYY) ?

Thanks in advanced

  • Hello,

    What version of OBM are you using, and what date format do you try to use? Is it from the list of supported formats? From the help:  

    Date Formats

    The date formats displayed in the Event Browser correspond to the language setting in the web browser. For example, if your browser is set to en-IN (English India), the date is displayed using the Indian date/month/year format, for example 17/7/13.

    https://docs.microfocus.com/itom/Operations_Bridge_Manager:2018.11/OMi/UserGuide/Events/java_event_browser_overview

    Regards,

    Rosen

  • Verified Answer

    Hi,

    In my experience the date format follows the setting for the web browser in question (meaning on a PC the date format from regional settings in Windows), but it only shows the year with two digits. Just like you experience.

    We have solved it by adding lines of code to a config file, as follows:

    1. Open the following file on the GW server(s) for editing:
    <HPBSM>/AppServer/webapps/opr-web.war/js/opr-evt-browser.js

    2. Add the following code after the row "opr.targetTimeZoneOffset = null;" (this code is based on our preferred date format, you can modify this as desired):

    /**

    * Set date time format from page

    */

     

    opr.getDateTimeFormat = function()

    {

      return "YYYY-MM-DD JJ:NN:SS";

    }

     

    /**

    * Set date format from page

    */

    opr.getDateFormat = function()

    {

      return "YYYY-MM-DD";

    }

     

    /**

    * Set time format from page

    */

    opr.getTimeFormat = function()

    {

      return "JJ:NN:SS";

    }

    3. Save the file and clear the cache on your browser.

    4. Log out of OBM and then log in again.

    The above changes the date format in the actual event browser. It does not change the date format used when opening event details of a specific events, though. Or the date format used anywhere else in the OBM console, for that matter.

    A very clever previous colleague of mine has looked into these bits too, but I'm not sure about the latest details regarding that. 

    BR,
    Frank Mortensen
    Managon AB 

  • By the way, this file will be overwritten under certain circumstances. For instance if you install a patch or upgrade OBM. So you should keep a copy of the changes, in case you need to reapply them at a later stage.

    And obviously it is a good idea to take a backup of the original file before making changes to it in the first place.

    Cheers,
    Frank