def->name = virXPathString("string(./name)", ctxt);
if (def->name == NULL)
- ignore_value(virAsprintf(&def->name, "%ld", tv.tv_sec));
+ ignore_value(virAsprintf(&def->name, "%lld", (long long)tv.tv_sec));
if (def->name == NULL) {
virReportOOMError();
def->description = virXPathString("string(./description)", ctxt);
if (!newSnapshot) {
- if (virXPathLong("string(./creationTime)", ctxt,
- &def->creationTime) < 0) {
+ if (virXPathLongLong("string(./creationTime)", ctxt,
+ &def->creationTime) < 0) {
virDomainReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("missing creationTime from existing snapshot"));
goto cleanup;
virBufferAsprintf(&buf, " <name>%s</name>\n", def->parent);
virBufferAddLit(&buf, " </parent>\n");
}
- virBufferAsprintf(&buf, " <creationTime>%ld</creationTime>\n",
+ virBufferAsprintf(&buf, " <creationTime>%lld</creationTime>\n",
def->creationTime);
virBufferAddLit(&buf, " <domain>\n");
virBufferAsprintf(&buf, " <uuid>%s</uuid>\n", domain_uuid);
virBufferPtr output);
int esxVI_DateTime_Deserialize(xmlNodePtr node, esxVI_DateTime **dateTime);
int esxVI_DateTime_ConvertToCalendarTime(esxVI_DateTime *dateTime,
- time_t *secondsSinceEpoch);
+ long long *secondsSinceEpoch);
struct testDateTime {
const char *dateTime;
- time_t calendarTime;
+ long long calendarTime;
};
static struct testDateTime times[] = {
{
int i;
esxVI_DateTime dateTime;
- time_t calendarTime;
+ long long calendarTime;
for (i = 0; i < ARRAY_CARDINALITY(times); ++i) {
dateTime.value = (char *)times[i].dateTime;