Skip to content
This repository has been archived by the owner on Feb 2, 2023. It is now read-only.


Browse files Browse the repository at this point in the history
8251365: Build failure on AIX after 8250636
Backport-of: 28f963f
  • Loading branch information
Sergey Nazarkin authored and Yuri Nesterenko committed Dec 11, 2020
1 parent cf0e935 commit 91e8812
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/hotspot/share/runtime/os.cpp
Expand Up @@ -154,19 +154,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;
UTC_to_local = static_cast<time_t>(zone);
UTC_to_local = timezone;

// 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;
// tm_gmtoff already includes adjustment for daylight saving
UTC_to_local = -(time_struct.tm_gmtoff);

Expand Down

1 comment on commit 91e8812

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.