abinitio
abinitio

Reputation: 837

How to I get GMT standard time when setting up schedule in Azure using DevOps

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

Answers (1)

anon
anon

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:

enter image description here

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. enter image description here

UK is the country in Europe so it uses GMT or W. Europe time (UTC +01:00).

Upvotes: 1

Related Questions