iphone - ALAsset timestamp returns wrong date -
i trying timestamp of images, can correct latitude , longitude values, timestamp returns current time, not exif time of image.
alassetslibraryassetforurlresultblock resultsblock = ^(alasset *asset) { cllocation *imageloc = [asset valueforproperty:alassetpropertylocation]; nsdateformatter *formatter = [[nsdateformatter alloc] init]; [formatter setdateformat:@"dd/mm/yy hh:mm:ss"]; nsstring *trailtime = [formatter stringfromdate:imageloc.timestamp]; nslog(@"---+++ image timestamp: %@", trailtime); [formatter release];
any appreciated, thanks
you need date using alassetpropertydate
key.
nsdate * date = [asset valueforproperty:alassetpropertydate]; /* use `nsdateformatter` instance print date */
Comments
Post a Comment