Reputation: 837
I have a runbook that I run in DevOps to set up a schedule in Azure using Register-AzAutomationScheduledRunbook
I cannot seem to get it to set to UK time. The VM is in Western Europe.
However when I use:
TimeZone = "GMT Standard Time"
The times I put for my schedule get an hour added onto them.
Does anyone know how to get the schedule to set to UK time please?
Thanks
Upvotes: 0
Views: 1110
Reputation:
The United Kingdom uses Greenwich Mean Time or Western European Time (UTC) and British Summer Time or Western European Summer Time (UTC+01:00).
To change the current time zone from PowerShell, run the command
$TimeZone = "W. Europe Standard Time"
New-AzAutomationSchedule -AutomationAccountName krishtoautomationdemo -Name "MySchedule" -StartTime "23:00" -OneTime -ResourceGroupName HariMT -TimeZone $TimeZone
Where $TimeZone variable contains the Id of the TimeZone.
Output:
Note: In the Local or Azure PowerShell, Run this command to get Ids of each time zone.
Get-TimeZone -ListAvailable
That Id is used to set timezone for creating the resources in Cloud through PowerShell.
UK is the country in Europe so it uses GMT or W. Europe time (UTC +01:00).
Upvotes: 1