Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
8251365: Build failure on AIX after 8250636
Reviewed-by: dholmes
  • Loading branch information
Dmitry Cherepanov committed Aug 11, 2020
1 parent d7b6bc7 commit 89be6f1e48c3cc15196d5ee4ff16cac13ea236bc
Showing 1 changed file with 8 additions and 4 deletions.
@@ -148,19 +148,23 @@ char* os::iso8601_time(char* buffer, size_t buffer_length, bool utc) {
// No offset when dealing with UTC
time_t UTC_to_local = 0;
if (!utc) {
#if defined(_WINDOWS)
#if defined(_ALLBSD_SOURCE) || defined(_GNU_SOURCE)
UTC_to_local = -(time_struct.tm_gmtoff);
#elif defined(_WINDOWS)
long zone;
_get_timezone(&zone);
UTC_to_local = static_cast<time_t>(zone);
#else
UTC_to_local = timezone;
#endif

// tm_gmtoff already includes adjustment for daylight saving
#if !defined(_ALLBSD_SOURCE) && !defined(_GNU_SOURCE)
// If daylight savings time is in effect,
// we are 1 hour East of our time zone
if (time_struct.tm_isdst > 0) {
UTC_to_local = UTC_to_local - seconds_per_hour;
}
#else
// tm_gmtoff already includes adjustment for daylight saving
UTC_to_local = -(time_struct.tm_gmtoff);
#endif
}

0 comments on commit 89be6f1

Please sign in to comment.