NSDate * selected = [datePicker date];
NSString * message = [[NSString alloc] initWithFormat: @ "The date and time you selected is:% @", selected];
UIAlertView * alert = [[UIAlertView alloc] initWithTitle: @ "Date and Time selected"
message: message
delegate: nil
cancelButtonTitle: @ "yes, i get it"
- (Void) viewDidLoad {
NSDate * now = [[NSDate alloc] init];
[DatePicker setDate: now];
[Now release];
}
This now is normal to marry, but after I press the button, get my selected time, message display program to me than I have from time to time picker on the actual choice of slow time 8 hours, this situation What are the reasons for the emergence?
Reply:
Of course, you are eight districts in Eastern Well ~ ~
That time is GMT
Reply:
Used to set the local time zone ~ ~
Reply:
Is not referring to [datePicker date] return time is Green Time? Or set the terms of the controls have problems? It displays the current time is right too, mostly [datePicker date] have a problem, how this should be changed. . . .
Reply:
Time zone is not the same chant. . . So there is time difference between
Reply:
If you change one, the other to the same places have changed.
NSCalendar
- (Void) setTimeZone: (NSTimeZone *) tz;
Reply:
You need to set the time zone iphone inside, set your current time zone.
Reply:
How to set? Changes in the simulator, or in the time picker have properties in the change? . . Can not find the zone have properties ah
Reply:
Problems in your body, change the code
Reply:
This. . . In the end is a code that was the problem or setup issues. . . Which parts of the code have a problem ah, I novice. . . The basic contents of the code is written according to the reference book
No comments:
Post a Comment