VMware {code} Community
deepakmits
Contributor
Contributor

timezone returned is wrong when targeting VC.

I have created application where I am targetting to VC and collecting stats data using perfQuery(). VC is in GMT+5:30 timezone and it can be seen from MOB and also box hosting VC.

After executing query -> (PerfEntityMetric) pValues[j]).getSampleInfo().getTimeStamp().getTimeZone() gives Timezone as "GMT".

I want to know what is going wrong here ? from where this API picks timezone ? or where to configure the timezone for VC so that it gets picked thru queryPerf API ?

Thanks,

Deepak

Reply
0 Kudos
2 Replies
admin
Immortal
Immortal

The time returned is the local time on the server and not your client's time. The time from the vmware server (i.e., service.CurrentTime(...)) i.e. CurrentDateTime is meant to return a GMT value only.

May be you can use a delta from your local time.

Reply
0 Kudos
deepakmits
Contributor
Contributor

I agree that it service.currentTime always shows GMT. But I am talking about the stats data which say I got for some ESX or VM . then sampleInfo along with data is giving time zone as GMT where as the time stamp is local timestamp(GMT+5:30).

Regards,

Deepak

Reply
0 Kudos