Time zone / summer time

Since this night, in France we changed time.
Now we are GMT+2, summer time.
But Blynk timer stayed at winter time until I reset all my ESP modules.
Anybody got same issue?
When I used local server with Blynk legacy, I never got this issues.

Are you using RTC clock in your sketch ?

1 Like

Yes I am using Blynk RTC

I guess the reset was required to sync your devices time with Blynk cloud.

Yes but it was automatic with local server or NTP server.
setSyncInterval(900 * 1000) didn’t do his job :sweat_smile:

1 Like

You can use it inside BLYNK_CONNECTED() function like this

BLYNK_CONNECTED() {    
  Blynk.sendInternal("rtc", "sync"); 
}

Not sure it will work because this function is called once a time, at start. :thinking:

I know that, but I’m not sure what are you trying to achieve.
Try this line

Blynk.sendInternal("rtc", "sync");

With a timer.

I want to synchronize blynk timer each time DST changes.

I can add this line, but I have to wait until winter time to see if it works well :sweat_smile:
And if it don’t work , I have to wait next summer time :wink:

1 Like

See you next year buddy :rofl:

1 Like

By the time you have a tested solution the EU will have finally agreed to end daylight saving time

:rofl: :rofl: :rofl:

Pete.

4 Likes

That’s right Pete, but we don’t know when.
The DST end was expected for 2020, since then, no decision has been taken :sweat_smile:

1 Like

@Blynk_Coeur so when you did a restart, you get:

BLYNK_CONNECTED() {    
  Blynk.sendInternal("rtc", "sync"); 
}

running, that synced your clock with correct time.

What does setSyncInterval do in your case?

1 Like

Okey, after looking into a code - setSyncInterval takes seconds. Not milliseconds.

So 900 * 1000 is a sync once in 10 days.

I found this here - https://github.com/blynkkk/blynk-library/blob/5a2883360b2fb273077e2dd209ea60c300e3f09a/examples/Widgets/RTC/RTC.ino#L94

@vshymanskyy probably should be added to the documentation.

2 Likes

There’s a really neat way to do it.
Let me write it up in the documentation and I’ll share it with you.

2 Likes

Oh !!!
It is the reason why setSyncInterval didn’t work at 2h AM !!

I have to replace it by setSyncInterval(60*10)

Is it better to use Blynk.sendInternal("rtc", "sync"); ?
Is the synchronization permanent or only at " blynk connected " . :thinking:

I don’t use this function, I only use setSyncInterval

I guess you should use

Blynk.sendInternal("rtc", "sync");

With the new blynk as mentioned in the documentation
https://docs.blynk.io/en/blynk.edgent/api/rtc-clock

1 Like

With setSyncInterval it should be permanent. But let’s wait for @vshymanskyy to document it. We’re waiting :slight_smile: .

2 Likes

https://docs.blynk.io/en/blynk.edgent/api/timezone-location#tracking-local-time

2 Likes