Syntax
int setTime(
    datetimeInfo * time
);
ContentsIndex
PreviousUpNext
LDateTimeClass::setTime Method
LDateTimeClass Class | Example
Syntax
int setTime(
    datetimeInfo * time
);
Description

Set system time

Parameters
Parameters 
Description 
datetimeInfo * time 
[IN] The datetime information structure. 
Returns

0: Successful. 

-1: Failed. 

 

Example
#include <LDateTime.h>
datetimeInfo t;
void setup()
{

}
void loop()
{
  LDateTime.getTime(&t);
  LDateTime.setTime(&t);
  delay(1000);
}
File

LDateTime.h

Class