Skip to page contentSkip to chat
ServiceNow support
    • Community
      Ask questions, give advice, and connect with fellow ServiceNow professionals.
      Developer
      Build, test, and deploy applications
      Documentation
      Find detailed information about ServiceNow products, apps, features, and releases.
      Impact
      Accelerate ROI and amplify your expertise.
      Learning
      Build skills with instructor-led and online training.
      Partner
      Grow your business with promotions, news, and marketing tools
      ServiceNow
      Learn about ServiceNow products & solutions.
      Store
      Download certified apps and integrations that complement ServiceNow.
      Support
      Manage your instances, access self-help, and get technical support.
Syslog probe message using the wrong localisation timestamp. How to force the mid to use a specific locale. - Support and Troubleshooting
  • >
  • Knowledge Base
  • >
  • Support and Troubleshooting (Knowledge Base)
  • >
  • Syslog probe message using the wrong localisation timestamp. How to force the mid to use a specific locale.
KB0829680

Syslog probe message using the wrong localisation timestamp. How to force the mid to use a specific locale.


669 Views Last updated : Dec 19, 2024 public Copy Permalink
KB Summary by Now Assist

Issue

While trying to use Syslog probe to send log data to an external log system the resultant message could have a localised timestamp which is in the wrong language for the target system failing to send the message.

Release

Any

Cause

The mid server will use one or another locale configuration depending on the local configuration of the server, if default locale is not the same as the target log systems expects that could cause issues.

In order to confirm this issue you can go to " MID Server > Background Script > Scripts - Background" and run the following script. This will run on the MID Server and return the results:

var stampDatetime = new Packages.java.util.Date();
var stampTimeZone = Packages.java.util.TimeZone.getTimeZone("GMT");
ms.log(stampTimeZone);

stampTimeZone = Packages.java.util.TimeZone.getDefault();
ms.log(stampTimeZone);

var stamp = new Packages.java.util.GregorianCalendar(stampTimeZone);
stamp.setTime(stampDatetime);
ms.log(stamp);

var sdf = new Packages.java.text.SimpleDateFormat("MMM dd HH:mm:ss");
sdf.setCalendar(stamp);
sdf.setTimeZone(stamp.getTimeZone());
var ts = sdf.format(stamp.getTime());

ms.log(ts);

 

The result would contain a timestamp on the locale on the MID. For example a system with Finnish as main language would give a result containing a date as follows:

*** Script: kesäkuuta 18 02:58:44

Resolution

Follow the next steps to force the MID server to use an specific locale as needed:

1. Make sure that the needed locale is installed on the MID system (English for this example). If not install it before continuing and make it the first option in the list.
2. Stop the MID and add the below property to wrapper-override.conf:

wrapper.lang=en_US 

3. Save the file and start the MID.
4. Repeat previous test and confirm date comes in English.


The world works with ServiceNow.

Sign in for more! There's more content available only to authenticated users Sign in for more!
Did this KB article help you?
Did this KB article help you?

How would you rate your Now Support digital experience?

*

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

What can we improve? Please select all that apply.

What are we doing well? Please select all that apply.

Tell us more

*

Do you expect a response from this feedback?

  • Terms and conditions
  • Privacy statement
  • GDPR
  • Cookie policy
  • © 2025 ServiceNow. All rights reserved.