Time zones? Looks like it's interpreting the first string in local time and 
outputting the string in UTC.

Thanks,

gopi@iPad

On Jul 13, 2011, at 6:22 PM, Tonny <[email protected]> wrote:

> hi, all
> thanks advance
> 
> i met a dateFromString issue, is there something wrong?
> 
>     NSString *dateString = @"2011-07-14 09:09:11"; 
> 
>     NSDateFormatter *formatter = [[NSDateFormatter alloc] init];      
>     [formatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"];
>     NSDate *date = [formatter dateFromString:dateString];
>     [formatter release];
> 
>     NSLog(@"Date : %@",date);
> 
> but i got ---------->   Date :  2011-07-14 01:09:11 +0000
> 
> PS:  simulator and my iphone got the same result, 
> 
> -- 
> Tonny
> Sent with Sparrow
> 
> _______________________________________________
> iPhone-talk mailing list
> [email protected]
> http://www.omnigroup.com/mailman/listinfo/iphone-talk
_______________________________________________
iPhone-talk mailing list
[email protected]
http://www.omnigroup.com/mailman/listinfo/iphone-talk

Reply via email to