Code to convert seconds to Date and time combination in java
<p>I have seconds like below:</p>

<p><code>1320130800</code></p>

<p>I need to convert the value into Date and Time Combination format.  While formatting I got the result as follows:</p>

<p><code>Tuesday,November 1,2011 2:00,AM</code></p>

<p>But the correct result is as follows:</p>

<p><code>Tuesday,November 1,2011 7:00,AM</code></p>

<p>For the above format conversion I used the below code:</p>

<pre><code> long millis = 1320130800*1000;
           Date date = new Date(millis);
           SimpleDateFormat sdf = new SimpleDateFormat("EEEE,MMMM d,yyyy h:mm a");
           String formattedDate = sdf.format(date);
           System.out.println(formattedDate);
</code></pre>

<p>Can any one guide me to get the correct answer?</p>
