Time widget sending different time for different token

Hello,

I have 3 projects in my organization, all of them has the same logic for time widget, two of them indicating correct time but one project displaying 3 hours less from yesterday.
As a test I have made a test same device and code, different token has different time.
Please let me know how to go forward for debugging this issue.

[Blynk Example Browser](https://Code used from example Blynk)

Thanks

I don’t really understand the links you’ve provided.

One is a link to the Sketch Builder RTC example - which doesn’t use the Time Input widget.

The second is an invalid link.

My first thoughts would be that what you are seeing is caused by a timezone issue, but without some proper info from you it’s difficult to say.

Pete.

Sorry for bad info. I will try again.
I do not have a time input issue, it is a time update problem of two projects designed in the same way, printed time is different.
My code used for testing is the RTC builder example :


#define BLYNK_TEMPLATE_ID           "TMPxxxxxx"
#define BLYNK_TEMPLATE_NAME         "Device"
#define BLYNK_AUTH_TOKEN            "YourAuthToken"

/* Comment this out to disable prints and save space */
#define BLYNK_PRINT Serial


#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>

// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "YourNetworkName";
char pass[] = "YourPassword";

BlynkTimer timer;

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

BLYNK_WRITE(InternalPinRTC) {
  long t = param.asLong();
  Serial.print("Unix time: ");
  Serial.print(t);
  Serial.println();
}

void setup()
{
  // Debug console
  Serial.begin(115200);

  Blynk.begin(BLYNK_AUTH_TOKEN, ssid, pass);
  // You can also specify server:
  //Blynk.begin(BLYNK_AUTH_TOKEN, ssid, pass, "blynk.cloud", 80);
  //Blynk.begin(BLYNK_AUTH_TOKEN, ssid, pass, IPAddress(192,168,1,100), 8080);

  timer.setInterval(10000L, requestTime);
}

void loop()
{
  Blynk.run();
  timer.run();
}

The time sent from the server it has 3 hours delay for my two different projects, which are using same template ID, name and code from RTC sketch builder.
Both projects have been worked well from more than 2 months.

Mircea

So you’re saying that it’s an RTC issue not a Time Input widget issue?

Without seeing the outpit from your serial monitor for your two different devices (turn on timestamps in the serial monitor, copy paste the text, and use triple backticks the same way as you would when posting code) it’s not possible for us to see the results you are seeing.

The Blynk servers will always send the time in GMT/Zulu time. Is your location in an area that is currently at GMT +/- 3 hours?

How are you converting the UNIX time from the serial monitor into a human readable value?

Pete.

Hi Pete
Now all my projects have the same time.
I did the followings:

  1. changed from metadata the Device Timezone from None to Bucharest - not worked
  2. after your last message I have checked the time zone it was different something like Africa, I don’t remember
  3. Changed for both devices the timezone to Bucharest - now working properly

Thankyou for your help

Mircea

1 Like