Local server and time zone settings for history graphs

EDIT 2: Problem solved. Reason is timezone settings on the phone. It seems blynk app resolving time with time zones not current time. In my case Turkey is in gmt+3 but there is no tz for this on android 7.0 so i choosed gmt+2 and manual configuration for +1h. blynk app still select gmt+2 and thats why i have 1h difference. i changed to different country with gmt+3 zone and everything working fine.

I have a couple modules and one rpi2 local server on my local network. everythings working fine with lastest server build,lastest raspbian,lastest java,lastest blynk library on arduino esp8266 ide.
i am trying to use history graph but it seems i am missing time zone settings because history graph listing data but there is 1 hour difference.
how can i choose or set right time?
p.s. my rpi has already ds3231 for time backup and it has right time. both rpi2 and ds3231 has same time. date function on rpi2 says right time. i am at Turkey (its gmt +3)

EDIT 1:

Here is sketch

#define BLYNK_PRINT Serial    // Comment this out to disable prints and save space
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
#include <SimpleTimer.h>
char auth[] = "xxx";

char host[] = "192.168.xx.xx";
char ssid[] = "xxx";
char pass[] = "xxx";

#define kapi 2
SimpleTimer timer;

void sendSensor()
{
  Serial.println("test");
  Blynk.virtualWrite(V5, "5");
}

void setup()
{
  
  Serial.begin(115200);
  Blynk.begin(auth, ssid, pass,host);
  Blynk.syncVirtual(7);
  pinMode(kapi, OUTPUT); 
  timer.setInterval(1000L, sendSensor);
}



BLYNK_WRITE(V7) 
{
  if (param.asInt() == 0) 
  {   
  digitalWrite(kapi, LOW); 
  } 
  else 
  {
  digitalWrite(kapi, HIGH); 
  }
}


void loop()
{
  Blynk.run();
  timer.run(); // Initiates SimpleTimer
}

here is app screen. button is push button for turning led on off on v7
historygraph showing v5 pin logs. if i select 1h mode it says not enough data. if i select 6h i can show data. time difference is 1 hour

History Graph doesn’t use the time from your ESP. It will always be 1 hour behind i.e. what happened 1 hour ago etc. Covered in the docs.

so i cant use 3min section on history graph. right ? if its right why its here :slight_smile: also i cant use 1h section. i can see data when i choose 6h range

If your system is set up correctly all the frequencies are available. All I was trying to say is that it doesn’t involve a “clock” on your hardware. Data is stored on the server and the graphs created from that.

Thank you for answer. So which part i am missing? i configured tz on rpi2 with rasp-conf and it says right time. blynk server app related setting or totaly rpi based?

What data are you trying to send to the graphs?

Sketch. Project details.

Graph screenshot.

Glad to see your problem is SOLVED
All in all, i decided to modify my post, by removing not true infos, leaving only the “real part”
So, YES history graph includes timestamp, and now it is clear, it is time zone dependant -just learned something

AND (!) there is a UNIX timestamp included in EXPORTED (and sent to e-mail address) data. But on the other hand, you have not ANY TIME intervals in it, just TimeStamp AND associated value received…

i edited first post with details.

@alonewolfx2 so in your sketch you send the String “5” every second to the server, right.

Try sending 5 not “5”.

I suspect at some point during the 6 hour period you actually sent a 5 to vpin rather that “5”. So 6h shows data but not 1h data as it doesn’t understand what you mean by quoting “5”. Ok?

firstly sending 5 and “5” are same result on server side. i dont know why. i changed to sending 5.

for example real time is 15:52,if i choose 1h period, history graph time starting 15:53, and if i choose 6h period graph starting time is 09:53 and propably hardware time is 14:52 on esp8266.so i cant see data if i choose 1h period. so as @marvin7 said requests has timestamp. seems maybe this is my problem. also i saw data on history graph last data sended on 14:52

Yes I checked 5 and “5” here and you are right.

Just checking something else.

@alonewolfx2 did the abandonment of GMT + 2 hrs during Winter for Turkey just affect my country (Cyprus) for the first time a few weeks ago or did the change affect Turkey too. Specifically what I mean by this was this the first year you didn’t move your clock backwards when European countries did?

In Cyprus, the divided north of the island (Turkish controlled) failed to return to GMT + 2 hours for the first time a few weeks ago. So our capital has 2 different timezones during the winter, bizarre but true.

Had some fatal consequences here, so much so the north have moved their day, but not clocks, along by at least 30 minutes.

Maybe your issue has nothing to do with this but there are ways to test it. Perhaps move to GMT (UK) on all your hardware (Pi and phone, ESP doesn’t need any time) and see what the graphs show. Also try GMT +2.

From what I can gather the abandonment of DST affects all of Turkey for the first time this year.

I suspect this is your problem and that some servers think you should now be GMT +2 not GMT +3.

I edited first post. problem coming from tz settings you are right but not server side. its phone side.

Yes I just guessed it would be the phone.

Do you have a fix?

Edit: seen your fix now in the OP.

In time, no pun intended, it is likely that Android will become aware of the changes made by Turkey and Egypt this year regarding DST.

BTW Europe\Istanbul still gmt+2 on time input widget on new android blynk app 2.0 too :slight_smile:

That will be because the details are taken from the Android OS that is now out of date. Not much Blynk can really do about that.