Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Asia/Jerusalem returns empty posix string #152

Open
itaysp opened this issue Jul 4, 2022 · 2 comments
Open

Asia/Jerusalem returns empty posix string #152

itaysp opened this issue Jul 4, 2022 · 2 comments

Comments

@itaysp
Copy link

itaysp commented Jul 4, 2022

Timezone lookup for: Asia/Jerusalem ... (round-trip 237 ms)  success.
  Olson: Asia/Jerusalem
  Posix:

The same happens if looking for IL:

Timezone lookup for: IL ... (round-trip 257 ms)  success.
  Olson: Asia/Jerusalem
  Posix:
@AlirezaSalehy
Copy link

Hi, buddy!
Same problem, Any progress?

@dolevhadad
Copy link

dolevhadad commented Nov 3, 2024

A year after I hope it's still relevant
the only way that I abled to solve it is to add the summer and winter time manually by setting the Posiix value.
it still needs some finetuning for the changes in our calendar but it can solve the case

SerialPrintln("");
timezone.setLocation(F("Asia/Jerusalem"));
timezone.setPosix(F("IST-2IDT,M3.5.5/2,M10.5.0/2"));
SerialPrintln("Current time Asia/Jerusalem : ");
SerialPrintln(timezone.dateTime());
  1. IST-2:
    IST is Israel Standard Time, 2 hours ahead of UTC, hence -2.

  2. IDT:
    IDT is Israel Daylight Time, which is used during the daylight saving period.

  3. M3.5.5/2,M10.5.0/2:
    M3.5.5/2: Daylight saving time starts in March (3rd month), on the last (5th) Friday (5) at 2:00 AM.
    M10.5.0/2: Daylight saving time ends in October (10th month), on the last (5th) Sunday (0) at 2:00 AM.

Output

Timezone lookup for: Asia/Jerusalem ... (round-trip 142 ms) success.
Olson: Asia/Jerusalem
Posix:
Current time Asia/Jerusalem :
Sunday, 03-Nov-2024 23:15:52 IST

I also set the NTP server to IL server - set those lines before the setLocation - not necessary

    setServer("il.pool.ntp.org");
    waitForSync();
    setDebug(DEBUG);  // if you want to see the communication to the server and the logs 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants