azure-powershell icon indicating copy to clipboard operation
azure-powershell copied to clipboard

New-AzureRmAutomationSchedule starttime offset not ignored when timezone present

Open jschwanz opened this issue 8 years ago • 8 comments

Description

I'm trying to create a schedule using New-AzureRmAutomationSchedule, but the start time is not being set correctly. The help doc says this under the -StartTime parameter: "If the TimeZone parameter is specified, the offset will be ignored and the time zone specified is used." When I supply the timezone it is not ignoring the offset in the StartTime, but is offsetting the StartTime between my local time and the specified time zone

Script/Steps for Reproduction

# running from a server configured with local timezone of PST

# properly creates schedule that starts 11/15/2018 8:00 AM (PT)
New-AzureRmAutomationSchedule -Name "testPT" -DayInterval 1 -StartTime "2018-11-15T08:00:00" -TimeZone "America/Los_Angeles"

# incorrectly creates schedule that starts 11/15/2018 12:00 AM (PT), expected 11/15/2018 8:00 AM (PT)
New-AzureRmAutomationSchedule -Name "testPT" -DayInterval 1 -StartTime "2018-11-15T08:00:00Z" -TimeZone "America/Los_Angeles"

# incorrectly creates schedule that starts 11/15/2018 11:00 AM (ET), expected 11/15/2018 8:00 AM (ET)
New-AzureRmAutomationSchedule -Name "testET" -DayInterval 1 -StartTime "2018-11-15T08:00:00" -TimeZone "America/New_York"

# incorrectly creates schedule that starts 11/15/2018 3:00 AM (ET), expected 11/15/2018 8:00 AM (ET)
New-AzureRmAutomationSchedule -Name "testET" -DayInterval 1 -StartTime "2018-11-15T08:00:00Z" -TimeZone "America/New_York"

Module Version

Get-Module -ListAvailable
ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Script     6.11.0     AzureRM
Script     5.1.1      AzureRM.Automation                  {Get-AzureRMAutomationHybridWorkerGroup, Get-AzureRmAutoma...

Environment Data

$PSVersionTable
Name                           Value
----                           -----
PSVersion                      5.1.14393.2273
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.14393.2273
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

jschwanz avatar Nov 15 '18 20:11 jschwanz

@vrdmr Can you take a look at this issue?

maddieclayton avatar Nov 15 '18 21:11 maddieclayton

Is there any update on this? I have since updated to the following versions, with the same result:

Get-Module -ListAvailable

ModuleType Version    Name
---------- -------    ----
Script     6.13.1     AzureRM
Script     6.1.1      AzureRM.Automation

jschwanz avatar Dec 05 '18 22:12 jschwanz

Any update on this? I'm having the same issue.

joezuchora avatar Jan 10 '19 19:01 joezuchora

I have the same issue

alainvezina avatar Feb 26 '19 17:02 alainvezina

I have also just encountered this issue. Can we please get an update on this

wayno4 avatar Apr 11 '19 04:04 wayno4

I am experiencing this issue. Has there been any resolution to this yet?

kristopherjturner avatar Sep 01 '19 01:09 kristopherjturner

Assigned to SME for triage.

andyw248 avatar Dec 06 '19 19:12 andyw248

:bell: Routing this issue to @act-codegen-extensibility-squad.