title: How to extract time for local time zone
body: <p>Hi All
  I want to extract time for my local time zone which i have set in my personal information</p>
  
  <p>like  consider apex code below:</p>
  
  <p>DateTime cDT = system.Now();<br>
  String localDateTime = cDT.format();</p>
  
  <p>now localDateTime will be like 4/1/2011 4:22 PM</p>
  
  <p>I want to extract 4:22 PM out of this</p>
  
  <p>One method given in salesforce documentation is hour,minute methods. But this method takes datetime as argument. But our format method returnes a string.</p>
  
  <p>The solution may be convert the string returned by format method to datetime type.
  But could not. i tried parse method. it converted my local time back to GMT Time. Secondly i tried valueOf Method. But it accepts string in a specific format. </p>
  
  <p>Please help me solving this problem. I have tries from my side. searched on net. but got no solution</p>