Skip to content

Conversation

@mohitjha-elastic
Copy link
Collaborator

Proposed commit message

servicenow: Add explicit date parsing for ECS @timestamp field.

Added explicit date parsing logic for the ECS @timestamp field to ensure consistent and accurate
timestamp handling during ingestion. Additionally, this ensures that the timestamp is explicitly parsed 
even when other date fields are not parsed, helping to avoid potential ingestion errors.

Checklist

  • I have reviewed tips for building integrations and this pull request is aligned with them.
  • I have verified that all data streams collect metrics or logs.
  • I have added an entry to my package's changelog.yml file.
  • I have verified that Kibana version constraints are current according to guidelines.
  • I have verified that any added dashboard complies with Kibana's Dashboard good practices

How to test this PR locally

  • Clone integrations repo.
  • Install the elastic package locally.
  • Start the elastic stack using the elastic package.
  • Move to integrations/packages/servicenow directory.
  • Run the following command to run tests.

elastic-package test -v

Related Issues

@mohitjha-elastic mohitjha-elastic self-assigned this Jan 6, 2026
@mohitjha-elastic mohitjha-elastic requested a review from a team as a code owner January 6, 2026 09:51
@mohitjha-elastic mohitjha-elastic added bugfix Pull request that fixes a bug issue Team:Security-Service Integrations Security Service Integrations team [elastic/security-service-integrations] Integration:servicenow ServiceNow Team:Sit-Crest Crest developers on the Security Integrations team [elastic/sit-crest-contractors] labels Jan 6, 2026
@elasticmachine
Copy link

Pinging @elastic/security-service-integrations (Team:Security-Service Integrations)

@elastic-vault-github-plugin-prod

🚀 Benchmarks report

To see the full report comment with /test benchmark fullreport

@elasticmachine
Copy link

💚 Build Succeeded

cc @mohitjha-elastic

Comment on lines +3347 to +3369
- yyyy-MM-dd H:mm:ss
- yyyy-MM-dd HH:mm:ss
- yyyy-MM-dd
- MM-dd-yyyy H:mm:ss
- MM-dd-yyyy HH:mm:ss
- MM-dd-yyyy
- dd-MM-yyyy H:mm:ss
- dd-MM-yyyy HH:mm:ss
- dd-MM-yyyy
- MM/dd/yyyy H:mm:ss
- MM/dd/yyyy HH:mm:ss
- MM/dd/yyyy
- dd/MM/yyyy H:mm:ss
- dd/MM/yyyy HH:mm:ss
- dd/MM/yyyy
- MM/dd/yy H:mm:ss
- MM/dd/yy HH:mm:ss
- MM/dd/yy
- dd.MM.yyyy H:mm:ss
- dd.MM.yyyy HH:mm:ss
- dd.MM.yyyy
- yyyy-MM-dd hh:mm:ss a
- ISO8601
Copy link
Contributor

@ShourieG ShourieG Jan 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My concern here is with formats like

  • MM-dd-yyyy
  • dd-MM-yyyy

as these are ambiguous from a global timestamp perspective. In india it's common trend to use dd-MM-yyyy or dd/MM/yyyy or dd.MM.yyyy. But in many places we use mm-dd-yyyy and etc.

How do we distinguish if the date 01-02-2026 or 05-07-2026 is in MM-dd-yyyy format or dd-MM-yyyy format ? Do we expect '@timestamp' to be normalised in any way ? If not how can we decide upon the right order of execution here ? If '@timestamp' is normalised as month-day-year, why have support for both patterns ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Pull request that fixes a bug issue Integration:servicenow ServiceNow Team:Security-Service Integrations Security Service Integrations team [elastic/security-service-integrations] Team:Sit-Crest Crest developers on the Security Integrations team [elastic/sit-crest-contractors]

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ServiceNow]: @timestamp field isn't being formatted and causing a "date_time_parse_exception"

3 participants