Community
cancel
Showing results for 
Search instead for 
Did you mean: 
EBayo
Beginner
1,003 Views

Set time and date without WIFI

Hi,

I'm trying to set time and date on my intel edison arduino without wifi (i have to do that ), but the library Time.h that gets the time with time_t t = now() and setTime() doesn't work because is not for linux. i'm trying to use time.h but it doesnt have a function that update the date like now();

Can someone help me? (sorry for my English)

Thanks

0 Kudos
5 Replies
idata
Community Manager
61 Views

Hello Eduardo,

 

 

Thank you for contacting Intel Technical Support.

 

 

You can find the instructions for setting the time and date in the following article on page 10:

 

https://lasr.cs.ucla.edu/classes/edison_tutorials/timing.pdf

 

 

Hope this helps.

 

 

Regards,

 

Octavian
EBayo
Beginner
61 Views

but how can i show it in the serial and set it from the ide of arduino? i dont get it

idata
Community Manager
61 Views

Hello Eduardo,

Without the use of WiFi, you can use standard linux commands to set the date and hardware clock on the Edison board. The following link provides useful linux commands to set this up: https://www.garron.me/en/linux/set-time-date-timezone-ntp-linux-shell-gnome-command-line.html https://www.garron.me/en/linux/set-time-date-timezone-ntp-linux-shell-gnome-command-line.html

In order for Edison to keep the date, you will need a RTC battery.

 

 

Regards,

 

Octavian
EBayo
Beginner
61 Views

But I want to set the time from the IDE of Arduino, and refresh each second to show with Serial.print. I don't get it with the standar linux commands...

idata
Community Manager
61 Views

Hello Eduardo,

 

 

Please note that this is not included in the IDE and is not standard. Also it has not been validated on the Galileo so we haven't tested to see if it works but you can follow the example on this page that should help you out: https://github.com/PaulStoffregen/Time https://github.com/PaulStoffregen/Time

 

 

Hope this helps.

 

 

Regards,

 

Octavian
Reply