Current Agent State

Hi all…
Very much thanks to everyone, I got the solution by the following calculation

DateTime origin = new DateTime(1970, 1, 1, 0, 0, 0, 0);
DateTime istdate = TimeZoneInfo.ConvertTimeFromUtc(origin.AddSeconds(Convert.ToDouble(1435376204)),TimeZoneInfo.FindSystemTimeZoneById(“India Standard Time”));
-----> This will convert the starting time for the agent’s current status to GMT+5.30.

DateTime curetime=TimeZoneInfo.ConvertTimeFromUtc(DateTime.UtcNow, TimeZoneInfo.FindSystemTimeZoneById(“India Standard Time”)); -----> This will convert the current time to GMT+5.30

TimeSpan diff = curetime - istdate; ------> This will get the exact duration of the agent’s current state(in seconds).

I said you that the time is in Unix format :slight_smile: :smiley: ;D

Yeah Thanks Kubig…
:smiley: :smiley: :smiley:

::slight_smile: