Skip to main content
Open topic with navigation CAPL Functions » General » Function Overview » getGPSTimeString

getGPSTimeString

Valid for: CANoe DE • CANoe:lite DE • CANoe4SW DE • CANoe4SW:lite DE

Function Syntax

void getGPSTimeString(char timeBuffer[], dword timestamp);

Description

Copies a printed representation of the GPS time stamp represented as UTC date and time into the supplied character buffer. The format of the string is ddd mmm dd hh:mm:ss jjjj (e.g. “Fri Aug 21 15:22:24 1998”).

Parameters

  • timeBuffer: The buffer the string will be written in. This buffer must be at least 26 characters long.
  • timestamp: The GPS time stamp (seconds have been displayed in time stamps since 1970-01-01, 00:00). The GPS time stamp is available as system variable as soon as a GPS device is configured.

Return Values

Example

variables
{
  char UTC_time_and_date_buffer[30]; // needs min. 26 chars
  dword UnixTimestamp;
}

on start
{
  getGPSTimeString(UTC_time_and_date_buffer, UnixTimestamp);
}
convertGPSTimestamp