Here is a cleaner way of doing this (this example gets GMT time including DST bias):

struct STimeZoneFromRegistry
{
   long  Bias;
   long  StandardBias;
   long  DaylightBias;
   SYSTEMTIME StandardDate;
   SYSTEMTIME DaylightDate;
};



static SYSTEMTIME GmtNow()
{
   FILETIME UTC;
   GetSystemTimeAsFileTime(&amp;UTC); 

   SYSTEMTIME GMT;

   TIME_ZONE_INFORMATION tz = {0};
   STimeZoneFromRegistry binary_data;
   DWORD size = sizeof(binary_data);
   HKEY hk = NULL;
   TCHAR zone_key[] = _T("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Time Zones\\GMT Standard Time");
   if ((RegOpenKeyEx(HKEY_LOCAL_MACHINE, zone_key, 0, KEY_QUERY_VALUE, &amp;hk) == ERROR_SUCCESS) &amp;&amp;
      (RegQueryValueEx(hk, "TZI", NULL, NULL, (BYTE *) &amp;binary_data, &amp;size) == ERROR_SUCCESS))
   {
      tz.Bias = binary_data.Bias;
      tz.DaylightBias = binary_data.DaylightBias;
      tz.DaylightDate = binary_data.DaylightDate;
      tz.StandardBias = binary_data.StandardBias;
      tz.StandardDate = binary_data.StandardDate;
   }

   SystemTimeToTzSpecificLocalTime(&amp;tz, &amp;UTC, &amp;GMT);

   return GMT;
 }


Unix C++: get time at a different zone
I have this XML file


&lt;domain type='kmc' id='007'&gt;
&lt;name&gt;virtual bug&lt;/name&gt;
&lt;uuid&gt;66523dfdf555dfd&lt;/uuid&gt;
&lt;os&gt;
&lt;type arch='xintel' machine='ubuntu'&gt;hvm&lt;/type&gt;
&lt;boot dev='hd'/&gt;
&lt;boot dev='cdrom'/&gt;
&lt;/os&gt;
&lt;memory unit='KiB'&gt;524288&lt;/memory&gt;
&lt;currentMemory unit='KiB'&gt;270336&lt;/currentMemory&gt;
&lt;vcpu placement='static'&gt;10&lt;/vcpu&gt;



Now i want parse this and fetch its attribute value. For instance i want to fetch the uuid field. So what should be the proper method to fetch it in Python. Any libraries or code snippets that could help is appreciated
