Timestamp defaults to UTC in Azure VMSS

Iswarya 5 Reputation points
2024-01-18T20:33:43.8433333+00:00

Timestamp defaults to UTC in Azure VMSS I am trying to create Azure VMSS using windows packer. I use powershell script to set timestamp to Eastern Standard Time. But when I launch the Azure VMSS, timestamp defaults to UTC.

Azure Virtual Machine Scale Sets
Azure Virtual Machine Scale Sets
Azure compute resources that are used to create and manage groups of heterogeneous load-balanced virtual machines.
355 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Prrudram-MSFT 22,836 Reputation points
    2024-01-22T10:07:14.12+00:00

    Hi @Iswarya

    If I understand your problem, you are trying to set the timezone for your Azure VMSS instances to Eastern Standard Time, but the timezone is defaulting to UTC. Here are a few things you can try to troubleshoot the issue

    Check that the timezone is set correctly in your Packer template. You can set the timezone in the provisioners section of your Packer template by running a PowerShell script that sets the timezone. Here is an example of how to set the timezone to Eastern Standard Time:

    { 
    "type": "powershell", 
    "inline": 
    [ 
    "Set-TimeZone -Id 'Eastern Standard Time'" 
    ] 
    }
    

    Make sure that the timezone is set correctly in your Packer template and that the PowerShell script is running successfully.

    Check that the timezone is set correctly in your Azure VMSS configuration. You can set the timezone for your VMSS instances by specifying the timeZone property in the virtualMachineProfile section of your Azure Resource Manager (ARM) template. Here is an example of how to set the timezone to Eastern Standard Time:

    "virtualMachineProfile": 
    { 
    "storageProfile": 
    { 
    ... 
    }, 
    "osProfile": 
    { 
    ... 
    }, 
    "networkProfile": 
    { 
    ... 
    }, 
    "timeZone": "Eastern Standard Time" 
    } 
    

    Make sure that the timeZone property is set correctly in your ARM template. Check that the timezone is set correctly in your VMSS instances. You can check the timezone of your VMSS instances by logging into one of the instances and running the following command:

    Get-TimeZone
    

    This will display the timezone of the instance. If the timezone is not set correctly, you can set it by running the following command:

    Set-TimeZone -Id 'Eastern Standard Time'
    

    --please don't forget to "[Accept the answer]" if the reply is helpful--

    0 comments No comments