Allow a timezone to be specified instead of sync to host timezone

This extends the XML to allow for

  <clock offset='timezone' timezone='Europe/Paris'/>

This is useful if the admin has not configured any timezone on the
host OS, but still wants to synchronize a guest to a specific one.

* src/conf/domain_conf.h, src/conf/domain_conf.c: Support extra
  'timezone' attribute on clock configuration
* docs/schemas/domain.rng: Add 'timezone' attribute
* src/xen/xend_internal.c, src/xen/xm_internal.c: Reject configs
  with a configurable timezone
This commit is contained in:
Daniel P. Berrange
2010-02-02 18:28:44 +00:00
parent 200c83b29d
commit e4d7433ef0
5 changed files with 65 additions and 14 deletions

View File

@@ -304,6 +304,16 @@
<attribute name="offset">
<value>utc</value>
</attribute>
<group>
<attribute name="offset">
<value>timezone</value>
</attribute>
<optional>
<attribute name="timezone">
<ref name="timeZone"/>
</attribute>
</optional>
</group>
<group>
<attribute name="offset">
<value>variable</value>
@@ -1633,4 +1643,9 @@
<param name="pattern">(-|\+)?[0-9]+</param>
</data>
</define>
<define name="timeZone">
<data type="string">
<param name="pattern">[a-zA-Z0-9_\.\+\-/]+</param>
</data>
</define>
</grammar>