Setting the Time/Date
Posted: Fri Mar 24, 2017 5:35 pm
Usually, the 8266 will set its time and date when it connects to the internet - and that seems to work very effectively. However, that requires an internet connection, obviously.
The problem is, when the 8266 acts as an AP, there doesn't seem to be any way to set the time. I have it linked to a DS1307 chip and can quite happily get the correct time and date from this, but there doesn't appear to be any way to input this to the 8266 so as to update its internal clock.
Even the I2C example on the documentation page has the comment: "Example of updating the time and/or date" - but of course, it doesn't so this; it just reads the time and date into local variables. You may say that, if I can access a DS1307, why do I need to update the internal clock?
Well, that may be a fair point, but it seems logical that there should be a way to set the internal timer other than by connecting to the internet.
Any ideas?
Phil
The problem is, when the 8266 acts as an AP, there doesn't seem to be any way to set the time. I have it linked to a DS1307 chip and can quite happily get the correct time and date from this, but there doesn't appear to be any way to input this to the 8266 so as to update its internal clock.
Even the I2C example on the documentation page has the comment: "Example of updating the time and/or date" - but of course, it doesn't so this; it just reads the time and date into local variables. You may say that, if I can access a DS1307, why do I need to update the internal clock?
Well, that may be a fair point, but it seems logical that there should be a way to set the internal timer other than by connecting to the internet.
Any ideas?
Phil