09-09-2018, 22:17
(This post was last modified: 09-09-2018, 23:01 by jarekh3.
Edit Reason: BTW. Today display first april 2018
)
(09-09-2018, 22:08)Werk_AG Wrote: Hi,
It seems that the ds3231.ino sketch was set the date and time correctly.
Please check if you are using the Time library supplied with the software package and not any other (newer or older).
Yes, this library from software package. I remove all old libraries before install.
Today is date: Sunday 1 April 2018
Time is wrong, set UTC+120 min but display UTC+60min
Code:
23:38:50.415 -> Set tcp server timout 30 seconds
23:38:50.451 -> RTC current date: Apr 01 2018
23:38:50.451 -> RTC current time: 22:38:48
23:38:50.487 -> Sending NTP request to sync clock...
NTP replied
23:38:50.595 -> UTC time from NTP server: 21:38:50
23:38:50.595 -> RTC adjusted to local time: 22:38:50Code:
TimeChangeRule PST = {"PST", Last, Sun, Mar, 1, 120}; //Portuguese Summer Time - "UTC + 1" or GMT + 1
TimeChangeRule GMT = {"GMT", Last, Sun, Oct, 2, 60}; //Portuguese Winter Time - "UTC + 0" or GMT
Timezone myTZ(PST, GMT);

