'How to change Date and Time settings on Google Cloud Instance?

I am trying to change Date and time settings to UTC+10 Canberra,Sydney,Melbourne on the instance but it always keep rolling back to UTC+00 Monrovio, Reykjavik. Doesn't matter even if I select set time zone to automatic.enter image description here



Solution 1:[1]

The zone "australia-southeast1-b" on the provided screenshot is a deployment area for Google Cloud Platform resources, where the physical hosts, your VM instance is running on, are physically located. This is a geographical zone. It is not relevant to time.

To configure Date and Time in Windows, you should:

  1. set correct time zone in Windows and
  2. make sure a time server is reachable

Google Cloud Engine VM instance is just a virtual machine that boots up with hardware clock set to UTC as many modern servers do nowadays.

If you looked at the VM instance logs in the GCP Console you'd see that VM BIOS reports time in UTC

2019/10/3 14:9:44 Begin firmware boot time

After a while BIOS hands over to the bootloader

2019/10/3 14:9:45 End firmware boot time
Booting from Hard Disk 0...

The OS boots up. Behind the scene the OS time service recognizes the system timezone, then sets up and synchronizes time with the time source. From that time forward running programs and services report events based on the local system time:

...
2019/10/03 09:10:05 GCEWindowsAgent: GCE Agent Started (version 4.6.0@1)

In the Windows Event Log you should see entries made by the Time-Service:

Log Name: System
Source: Time-Service
Level: Information

The time provider NtpClient is currently receiving valid time data from metadata.google.internal,0x1 (ntp.m|0x1|0.0.0.0:123->169.254.169.254:123).
The time service is now synchronizing the system time with the time source metadata.google.internal,0x1 (ntp.m|0x1|0.0.0.0:123->169.254.169.254:123).

In the command prompt you can ensure that the time configuration and state are correct:

C:\Users\user>systeminfo | find /i "Time"
System Boot Time:          10/3/2019, 9:09:49 AM
Time Zone:                 (UTC-06:00) Central Time (US & Canada)

Hence you don't need synchronizing time neither manually or with any startup script. The time service will do this for you: synchronize the system time shortly after the system boot and keep it in sync afterwards. All you need is to set correct Time zone and the Internet time server for Windows, and then make sure the time server is reachable via the network.

If you can't wait for the timesync cycle completion, you can logon to Windows and force time synchronization manually:

net stop W32Time 
net start W32Time 
w32tm /resync /force

Solution 2:[2]

To O.P Answer to your question if I understand correctly, your answer is:

timedatectl set-timezone "Australia/Melbourne"

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1
Solution 2 learner