Highlighted
Contributor.. Contributor..
Contributor..
234 views

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

Jump to solution

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

Labels (1)
0 Likes
1 Solution

Accepted Solutions
Highlighted
Acclaimed Contributor.. Acclaimed Contributor..
Acclaimed Contributor..

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 

View solution in original post

0 Likes
3 Replies
Highlighted
Micro Focus Expert
Micro Focus Expert

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

Micro Focus Software Support
The views expressed in my contributions are my own and do not necessarily reflect the views and strategy of Micro Focus.
If you find this or any post resolves your issue, please be sure to mark it as an accepted solution.
0 Likes
Highlighted
Acclaimed Contributor.. Acclaimed Contributor..
Acclaimed Contributor..

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 

View solution in original post

0 Likes
Highlighted
Acclaimed Contributor.. Acclaimed Contributor..
Acclaimed Contributor..

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

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.