-(NSDate *) Getnowdatefromatandate: (NSDate *) anydate
{
Set source date Time zone
nstimezone* Sourcetimezone = [Nstimezone timezonewithabbreviation:@ "UTC"];//or GMT
Set the target date time zone after conversion
nstimezone* destinationTimeZone = [Nstimezone localtimezone];
Get the offset from the source date to the world standard Time
Nsinteger Sourcegmtoffset = [Sourcetimezone secondsfromgmtfordate:anydate];
The offset of the target date from the local time zone
Nsinteger Destinationgmtoffset = [destinationTimeZone secondsfromgmtfordate:anydate];
Get the difference between the time offset
Nstimeinterval interval = Destinationgmtoffset-sourcegmtoffset;
Switch to present time
nsdate* Destinationdatenow = [[NSDate alloc] Initwithtimeinterval:interval sincedate:anydate];
return destinationdatenow;
}
IOS system time is converted to the current timezone time