title: Converting Date to milli seconds in ios
body: <p>hi am using following to convert date to string in objective C.</p>
  
  <pre><code>-(void)convertDateToJsonString:(NSString *)strDate
  {
  
  
      NSDateFormatter * formatter = [[NSDateFormatter alloc] init];
      [formatter setTimeZone:[NSTimeZone systemTimeZone]];
      [formatter setLocale:[NSLocale systemLocale]];
      [formatter setDateFormat:@"yyyy/MM/dd"];
  
  
      NSDate * date =[formatter dateFromString:strDate];
  
      long long milliseconds = (long long)([date timeIntervalSince1970] * 1000.0);
  
      NSLog(@"After conversion %lli",milliseconds);
  
  
  
  }
  </code></pre>
  
  <p>its giving date but always getting time is <strong>00:00:00</strong> something not current time.How to get selected date with current time in milli second.</p>
  
  <p>but its working for current date like below</p>
  
  <pre><code> long long millisecs = (long long)([[NSDate date] timeIntervalSince1970] * 1000.0);
  
      NSLog(@"After conversion %lli",millisecs);
  </code></pre>
  
  <p>Am getting from date picker date and converting.</p>
  
  <p>And also for getting exact time zone like +530 in ios is there any methods?
  i know <strong>[NSTimezone Systemzone]</strong> but its giving whole value like <strong>"Asia/kolkatta +..."</strong></p>