CAPL Functions » Car2x » C2xConvertTimeToMSSinceUTC
C2xConvertTimeToMSSinceUTC
Valid for: CANoe DE NoteYour CANoe DE product considers specific leap seconds for the conversion.
Function Syntax
Description
This function returns the elapsed milliseconds between a reference time and a time stamp. As time stamp input either a Unix time stamp in milliseconds (form 1) or a UTC time given with year, month, hour and so on as separate parameters (form 2) can be given. Specific reference times can be set as additional parameter. The result can be used for the time stamps defined in e.g. a CAM or a DENM.Parameters
- itsTimestamp: Unix time stamp in milliseconds (time zone UTC)
- year: Year of the UTC time stamp
- month: Month of the UTC time stamp (1..12)
- day: Day of the UTC time stamp (1..31)
- hours: Hours of the UTC time stamp since midnight (0..23)
- minutes: Minutes of the UTC time stamp after the hour (0..59)
- seconds: Seconds of the UTC time stamp after the minute (0..59)
- milliseconds: Milliseconds of the UTC time stamp after the second (1..999)
- refTime: The following reference times can be set:
- 2004-01-01 = 0 (2004-01-01T00:00:00,000 UTC)
- 2010-01-01 = 1 (2010-01-01T00:00:00,000 UTC)
Return Values
- Time stamp: Time stamp in milliseconds
- -1: Error