Skip to content

setLocation #183

@staffanwillen

Description

@staffanwillen

I get the wrong time zone!!! fyi lcdPrint below prints on my lcd. "Time Server Sync" works :) But after the setLocation error "Time zone error" which I always get , I seem to end up at GMT or something - anyway one hour ahead of where I am - in Stockholm/Sweden. I have tried "se", GMT-1", "Sweden/Stockholm" but to no avail. Time here is 02:28 but the HawkTZ object below reports 01:28
Please advise!!!

  Timezone HawkTZ;

 // Time Server init
  int c = 0;
  lcdPrint(1,1,"Time Server Sync");
  while (!waitForSync(1)) {
    c++;
    lcdPrint(2,1,String(c));
    if (c==10) {
      NVIC_SystemReset();
    }
   }
  lcdClear();
  if (!HawkTZ.setLocation("se")) {
     lcdPrint(1,1,"Time zone error");
     delay(4000);
  }
  lcdPrint(4,1,HawkTZ.dateTime("j/n H:i"));

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions