Well, my vacation time is quickly coming to an end, and soon it will be the New Year!
I’m consistently asked what the default date/time sttings are when deploying to Windows Azure. It may not be obvious to developers new to the platform.
All Windows Azure servers utilize UTC time, and ‘en-US’ locale settings out-of-box. It is recommended to maintain applications that can convert local time (UTC) into the desired time/date formats.
You can see this by using remote desktop to “peer into and inspect” settings on your Windows Azure deployments. You will find that the server localization settings (Control Panel) are indeed set to “United States” for location, and “English (United States)” for Language Settings.
For date/time settings, “GMT Greenwich Mean Time : Dublin, Edinburgh, Lisbon, London” is the default selection, no matter which data center you are deployed to as well.
The Fabric Controller maintains operating system time synchronization for the system when roles are first booted. You could, with the latest SDKs. utilize administrative access startup scripts to change the localization settings (including local server time), but it is not recommended you do so. Doing so will introduce instability and the fabric controller may determine your role is out of sync. You will likely end up cycling your roles as fabric attempts to bring them to goal state in such a case. A better strategy is to write our applications to be aware that they actually run with UTC and default US CultureInfo settings.
For more info on manipulating Date/Time settings with .NET Framework 4.0, refer here:
Another huge shortcut tip:
Using Remote Desktop is extremely helpful to diagnose issues with Windows Azure, including ensuring an application you might want to script during startup, will actually install and run on the virtualized role images. You can Edit your Remote Desktop connection files (.rdp) by right-clicking the file saved to your desktop, and selecting Edit. This will enable you to map your local drive to the VM, so you can seamlessly transfer files to and from the role instance you are connected to.
I’m consistently using PowerShell, or Snippet Compiler (created by Jeff Key, and available at http://www.sliver.com), to output settings, or programatically manupulate objects.
PowerShell is already on the Windows Azure role instances for your enjoyment, and Snippet Compiler take a few seconds to copy & paste into the C:\Applications folder on the VM to “play with”.