d$ = date$d = dateunix(d$)wlog "date$: " + d$
d$ = unixdate$(d)wlog "Europe: " + d$
d$ = unixdate$(d, 1)wlog "American: " + d$
d$ = unixdate$(d, 2)wlog "Canadian: " + d$
As always, thanks cicciocb.It happens to me on a Wemos D1 mini, with Annex 1.42.4. Could it be because of my time zone in config?CET-1CEST,M3.5.0,M10.5.0/3
I was going crazy with a program that I am writing, because it always synchronized when I turned on the Wemos.I have solved it by simply adding 1 a day. But I'm curious if it happens to someone else.
dead = 0
i2c.setup 4, 5
if (rtc.time$ <> time$) OR (rtc.date$ <> date$) then Sincro
while NOT dead wlog "RTC:" + RTC.TIME$ + " " + RTC.DATE$ wlog "NTP:" + time$ + " " + date$ pause 10000 wlogwend
SUB Sincrodim f(5)LOCAL f$, i, j
f$ = replace$(unixdate$(dateunix(date$),2),"/","")f$ = f$ + replace$(unixtime$(timeunix(time$)),":","")
for i = 0 to 5 j = (i*2) + 1 f(i) = val(mid$(f$, j, 2))next i
' RTC.SETTIME Year, Month, Day, Hours, Minutes, SecondsRTC.SETTIME f(0), f(1), f(2)+1, f(3), f(4), f(5)wlog "Date and time synchronized by NTP"
END SUB
--
You received this message because you are subscribed to the Google Groups "Annex WiFi RDS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to annex_wifi_rd...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/annex_wifi_rds/d162f117-49f6-4c36-9cb3-ac3bf9d92db6o%40googlegroups.com.