Skip to content

Update handling of windows timezone to account for usage of dword/signed integers by vCenter 8#190

Open
lomeroe wants to merge 6 commits into
chef:mainfrom
lomeroe:update_windows_timezone_pattern
Open

Update handling of windows timezone to account for usage of dword/signed integers by vCenter 8#190
lomeroe wants to merge 6 commits into
chef:mainfrom
lomeroe:update_windows_timezone_pattern

Conversation

@lomeroe

@lomeroe lomeroe commented Aug 26, 2025

Copy link
Copy Markdown
Contributor

vCenter 8 expects dword/signed integer versions of the timezone hex values for windows, i.e. 0x80000050 (UTC time) when converted to an integer should be "-2147483568" not "2147483728" as the basic "to_i" returns

This PR allows specifying negative integer numbers as well as properly converting hex values. Additionally, if either type is passed as a string representation, the value is properly converted.

Description

When attempting to customize a Windows VM's timezone, the use of "0x80000050" (as an example) no longer properly sets the timezone to "UTC". vCenter expects the a signed integer version, where 0x8000050 is -2147483568.

Related Issue

#189

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Chore (non-breaking change that does not add functionality or fix an issue)

Checklist:

  • I have read the CONTRIBUTING document.
  • I have run the pre-merge tests locally and they pass.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • If Gemfile.lock has changed, I have used --conservative to do it and included the full output in the Description above.
  • All new and existing tests passed.
  • All commits have been signed-off for the Developer Certificate of Origin.

…tegers by vCenter 8

vCenter 8 expects signed integer versions of the timezone hex values, i.e. 0x80000050 (UTC timezone) when converted to an integer should be "-2147483568" not "2147483728"
Signed-off-by: lomeroe <github@moorefam5.com>
Signed-off-by: lomeroe <github@moorefam5.com>
@lomeroe lomeroe requested review from a team as code owners August 26, 2025 22:17
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant