Skip to content

Commit

Permalink
Ensure Windows time zone specs request SeTimeZonePrivilege properly
Browse files Browse the repository at this point in the history
  • Loading branch information
HertzDevil authored Feb 15, 2024
1 parent c0270c6 commit ad6d78d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion spec/support/time.cr
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ end
],
)
if LibC.AdjustTokenPrivileges(adjust_token, 0, pointerof(new_privileges), 0, nil, nil) != 0
return true
# ERROR_NOT_ALL_ASSIGNED means the privilege was not adjusted even though the return value is nonzero
return true if WinError.value.error_success?
end
end

Expand Down

0 comments on commit ad6d78d

Please sign in to comment.