Skip to content

Commit

Permalink
Take into account leap seconds in AUX messages' timestamps; update deps
Browse files Browse the repository at this point in the history
Fixes: #690

Signed-off-by: Irek Fakhrutdinov <[email protected]>
  • Loading branch information
ifakhrutdinov committed Mar 4, 2024
1 parent b20a542 commit 5093ae5
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

All notable changes to the ZSS package will be documented in this file.

## `2.16.0`
- Bugfix: AUX should take leap seconds into account in their log messages' timestamp (#690, #691)

## `2.14.0`
- Bugfix: ZSS would not use zowe.cookieIdentifier when an HA config was used.

Expand Down
2 changes: 1 addition & 1 deletion deps/zowe-common-c
10 changes: 9 additions & 1 deletion zis-aux/src/aux-utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -199,19 +199,27 @@ static void getSTCK(uint64 *stckValue) {
__asm(" STCK 0(%0)" : : "r"(stckValue));
}

static int64 getLocalTimeOffset() {
static int64 getLocalTimeOffset(void) {
CVT * __ptr32 cvt = *(void * __ptr32 * __ptr32)0x10;
void * __ptr32 cvtext2 = cvt->cvtext2;
int64 *cvtldto = (int64 * __ptr32)(cvtext2 + 0x38);
return *cvtldto;
}

static int64 getLeapSecondsOffset(void) {
CVT * __ptr32 cvt = *(void * __ptr32 * __ptr32)0x10;
void * __ptr32 cvtext2 = cvt->cvtext2;
int64 *cvtlso = (int64 * __ptr32)(cvtext2 + 0x50);
return *cvtlso;
}

static void getCurrentLogTimestamp(LogTimestamp *timestamp) {

uint64 stck = 0;
getSTCK(&stck);

stck += getLocalTimeOffset();
stck -= getLeapSecondsOffset();

stckToLogTimestamp(stck, timestamp);

Expand Down

0 comments on commit 5093ae5

Please sign in to comment.