Skip to content

Commit

Permalink
Disable warnings timezone
Browse files Browse the repository at this point in the history
  • Loading branch information
fjtrujy committed Dec 7, 2023
1 parent 4a5d65f commit 514a0a7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ee/libcglue/src/timezone.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ void _libcglue_timezone_update()
int minutes = tzOffsetAbs - hours * 60;
int daylight = configIsDaylightSavingEnabledWithIODriver(&driver);
static char tz[15];
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat-overflow"
sprintf(tz, "GMT%s%02i:%02i%s", tzOffset < 0 ? "+" : "-", hours, minutes, daylight ? "DST" : "");
#pragma GCC diagnostic pop
setenv("TZ", tz, 1);
}
#endif
Expand Down

0 comments on commit 514a0a7

Please sign in to comment.