I just need a small help regarding the DateTime format in java.I am writing a simple chat application based on yahoo messanger,in which I will read the packet of yahoo messanger and display the chat messages.Now I want to display the time from the given header.In a particular article it is said the "timestamp" will be 0x477BBA61(decimal 1199290977) which means "Wed, 2 Jan 2008 16:22:57 GMT" . I am trying to reveal how that decimal is converted to that particular date.I tried to write a simple java application to convert that and its giving some other time.
public static void main(String[] arg)
{
Calendar obj = Calendar.getInstance();
obj.setTimeZone(TimeZone.getTimeZone("GMT"));
obj.setTimeInMillis(1199290977l);
System.out.println( obj.get(Calendar.HOUR)+":"+obj.get(Calendar.MINUTE));
}
output:9:8
Can anybody help me with this?