8000 SNTP: backport espressif sntp api for lwip2 by d-a-v · Pull Request #7097 · esp8266/Arduino · GitHub
[go: up one dir, main page]

Skip to content

SNTP: backport espressif sntp api for lwip2 #7097

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

Merged
merged 3 commits into from
Feb 22, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
typo
  • Loading branch information
d-a-v committed Feb 21, 2020
commit cb3d4fe282694ec3393e95f8c6f8f023d43011bf
4 changes: 2 additions & 2 deletions cores/esp8266/time.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ int clock_gettime(clockid_t unused, struct timespec *tp)
#define sntp_real_timestamp sntp_get_current_timestamp()
#endif

#if LWIP_VERSION_MAJOR == 2
#if LWIP_VERSION_MAJOR != 1

// backport Espressif api

Expand All @@ -90,7 +90,7 @@ bool sntp_set_timezone_in_seconds (int32_t timezone_sec)

bool sntp_set_timezone(sint8 timezone_in_hours)
{
return sntp_set_timezone_in_seconds(3600 * ((int)timezone));
return sntp_set_timezone_in_seconds(3600 * ((int)timezone_in_hours));
}

char* sntp_get_real_time(time_t t)
Expand Down
0