Default language.

  Important This documentation space contains information about the SaaS version of BMC Helix Discovery. If you are using the on-premises version of BMC Helix Discovery, see BMC Helix Discovery 24.3 (On-Premises).

time.parseLocal


time.parseLocal(string)


Converts a string representing a local time into an internal UTC datetime object. If no time zone is present in the string it will use the time zone of the appliance.

 A wide range of date formats are supported including:

European formats

  • dd.mm.yyyy
  • dd/mm/yyyy
  • dd-mm-yyyy

US formats

  • mm/dd/yyyy
  • mm-dd-yyyy

ISO formats

  • yyyy/mm/dd
  • yyyy-mm-dd
  • yyyymmdd

Literal formats

  • day, month, year
  • month, day, year


Additionally, the following formats are supported and they are tried in order to find the first match:

Format

Description

dmy1

European date parser (dd.mm.yyyy)

ymd3

US style ISO date parser (yyyy/mm/dd)

mdy1

US date parser (mm/dd/yyyy)

mdy2

Alternative US date parser (mm-dd-yyyy)

ymd1

ISO date parser (yyyy-mm-dd)

ymd2

Alternative ISO date parser (yyyymmdd)

dmy2

Alternative European date parser 1 (dd/mm/yyyy)

dmy3

Alternative European date parser 2 (dd-mm-yyyy)

lit1

Literal date parser (day, month order)

lit2

Alternative literal date parser (month, day order)

unknown

No date part was found, defaultdate was used

If the passed date string cannot be parsed, time.parseLocal simply returns the the current date.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*