Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After Powershell Set-Date, Windows is resetting to live Date shortly #8102

Closed
2 of 10 tasks
Gustl22 opened this issue Aug 16, 2023 · 1 comment
Closed
2 of 10 tasks
Assignees
Labels
bug report investigate Collect additional information, like space on disk, other tool incompatibilities etc. OS: Windows

Comments

@Gustl22
Copy link

Gustl22 commented Aug 16, 2023

Description

In order to install a certificate for a virtual audio device (see #2528, which is also not resolved completely), I need to reset the system date time.

But after setting the time with:

Set-Date (Get-Date "2023-07-04 12:00:00");

It is reset immediately after that. See the run.

I already asked this in the Microsoft QA: https://learn.microsoft.com/en-us/answers/questions/1345225/powershell-set-date-is-resetting-to-its-original-v

They proposed, that the error is in the system host, which constantly trying to keep the date up to date. Is there a way to disable resetting the system time from the host side?

Platforms affected

  • Azure DevOps
  • GitHub Actions - Standard Runners
  • GitHub Actions - Larger Runners

Runner images affected

  • Ubuntu 20.04
  • Ubuntu 22.04
  • macOS 11
  • macOS 12
  • macOS 13
  • Windows Server 2019
  • Windows Server 2022

Image version and build link

Version: 20230804.1.0

Is it regression?

I don't think so

Expected behavior

If setting the time with Set-time, then keep the time on the guest system.

Actual behavior

The time is resetting immediately after setting the custom time, see "Show timestamps" on a regular GH action run.

Repro steps

net stop w32time; W32tm /unregister; Set-Date (Get-Date "2023-07-04 12:00:00")
# Do stuff....
# ...date is reset to current DateTime before finishing the tasks
# Reset the time if wanted:
# W32tm /register; net start w32time; w32tm /resync /force; $currentDate = Get-Date; Write-Host "Current System Date: $currentDate"
@shamil-mubarakshin
Copy link
Contributor

Hello @Gustl22, thanks for reporting.
We will take a look

@shamil-mubarakshin shamil-mubarakshin added OS: Windows investigate Collect additional information, like space on disk, other tool incompatibilities etc. and removed needs triage labels Aug 17, 2023
@ilia-shipitsin ilia-shipitsin converted this issue into discussion #8105 Aug 17, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
bug report investigate Collect additional information, like space on disk, other tool incompatibilities etc. OS: Windows
Projects
None yet
Development

No branches or pull requests

3 participants