Arduino_MKRGPS - getTime()

Read the current epoch time from the GPS.

Syntax

GPS.getTime()

Parameters

None.

Returns

The current epoch time from the GPS.

Example

// Check if there is new GPS data available
if (GPS.available()) {
    // Read GPS values
    unsigned long epochTime = GPS.getTime();

    // ...

    // Print GPS data
    Serial.print("Epoch time: ");
    Serial.println(epochTime);
}

See also