New-AzureRmAutomationSchedule starttime offset not ignored when timezone present
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
@vrdmr Can you take a look at this issue?
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
Any update on this? I'm having the same issue.
I have the same issue
I have also just encountered this issue. Can we please get an update on this
I am experiencing this issue. Has there been any resolution to this yet?
Assigned to SME for triage.
:bell: Routing this issue to @act-codegen-extensibility-squad.