[Libguestfs] [PATCH] p2v: Calculate offset of the Real Time Clock from UTC.

Pino Toscano ptoscano at redhat.com
Fri Mar 24 11:08:30 UTC 2017


On Tuesday, 21 March 2017 17:48:50 CET Richard W.M. Jones wrote:
> Calculate the offset of the physical host's Real Time Clock (RTC) from
> UTC and pass this to virt-v2v through the libvirt XML description of
> the physical machine.
> 
> The libvirt XML is modified to add one of the following:
> 
> (no <clock/> element)
> 
>  - if the RTC could not be read or there was some other time
>    calculation error.
> 
> <clock offset='utc' />
> 
>  - if the RTC is the same as UTC.
> 
> <clock offset='localtime' />
> 
>  - if the RTC is in local time.
> 
>    It's not possible to distinguish between UTC and localtime in
>    timezones that lie along the Greenwich Meridian (obviously
>    including the UK), when daylight savings time is not in effect.  In
>    that case, UTC is chosen.
> 
>    Necessarily in timezones that use DST, this depends on when
>    virt-p2v is run, so in the unusual case where a physical machine is
>    switched off for a long time and then booted directly into virt-p2v
>    when DST has changed, the calculation can be wrong.
> 
> <clock offset='variable' basis='utc' adjustment='<seconds>' />
> 
>  - if the RTC is some other offset to UTC, other than equal to UTC or
>    localtime.
> ---

LGTM.

Thanks,
-- 
Pino Toscano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://listman.redhat.com/archives/libguestfs/attachments/20170324/12814518/attachment.sig>


More information about the Libguestfs mailing list