ios - Different dates as result when converting from NSDateComponents to NSDate -


i experimenting nsdate , nsdatecomponents , have code:

... nsdatecomponents *newcomponents = [[nsdatecomponents alloc] init];                 [newcomponents setyear:from_year];                 [newcomponents setmonth:from_month];                 [newcomponents setday:from_day];                 [newcomponents sethour:from_hour];                 [newcomponents setminute:from_min];                 nslog(@"newcomponents - %@", newcomponents);                 nsdate *newdatefrom = [calendar datefromcomponents:newcomponents];// here is!                 nslog(@"newdatefrom - %@", [newdatefrom description]); ... 

and appropriate log of used nslog's:

newcomponents - calendar year: 2013 month: 9 day: 3 hour: 14 minute: 0

newdatefrom - 2013-09-03 11:00:00 +0000

so, somehow retreiving 11:00 time, setting 14:00 @ previous strings of code. how can be?


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -