microsoft / SCVMMLinuxGuestAgent

Linux Agent for System Center Virtual Machine Manager
Apache License 2.0
18 stars 15 forks source link

Limited timezone selection / daylight savings time #4

Open Tadas opened 6 years ago

Tadas commented 6 years ago

Hi, seems like there is no option to configure VMs with the correct timezone where daylight savings time is used.

I want to configure my VMs to have the correct London time. The only suitable option in SCVMMTemplate propertiesOS Configuration is (GMT) Greenwich Mean Time : Dublin, Edinburgh, Lisbon, London but it doesn't apply during summer as the timezone changes to UTC+1

https://github.com/Microsoft/SCVMMLinuxGuestAgent/blob/d95bd437be488fa7f7407acf6e9f653a523c6d97/vmm/dev/scripts/cfgtimezone#L69

This command relies on a limited lookup list of timezones in https://github.com/Microsoft/SCVMMLinuxGuestAgent/blob/master/vmm/dev/scripts/tztable

For the time to be correct in London it should use /usr/share/zoneinfo/Europe/London but there doesn't seem to be a way to configure that

moschlar commented 5 years ago

Same here for the timezone Europe/Berlin !

Tadas commented 5 years ago

Forgot mention a workaround, doh. You should be able to add a RunOnce command to the OS template that does something like ln -s /usr/share/zoneinfo/Europe/Berlin /etc/localtime

moschlar commented 5 years ago

I actually did

echo "Europe/Berlin" > /etc/timezone
dpkg-reconfigure tzdata

:wink:

moschlar commented 5 years ago

Which doesn't even work properly. Great!

moschlar commented 5 years ago

I actually don't see the point in the tztable mapping - why can't the SCVMM just supply the wanted timezone as a string?