´ä:Çѱ¹ ·ÎĶ·Î ½Ã°¢ Ç¥ÇöÇϱâ...


[ Follow Ups ] [ Post Followup ] [ ÀÚ¹Ù ¹¯°í ´äÇϱâ ]

Posted by À±°æ±¸ on May 02, 1997 at 18:09:49:

In Reply to: [Áú¹®] ÇöÀçÀÇ ½Ã°¢¾Ë±â (Çѱ¹½Ã°¢) posted by °­½Åµ¿ on May 01, 1997 at 10:35:02:

ÀϹÝÀûÀ¸·Î ÀÚ¹Ù 1.1ÀÇ text ÆÐÅ°Áö¸¦ »ç¿ëÇÏ¿© Çü½ÄÀ» ÁöÁ¤ÇÒ ¼ö ÀÖ½À´Ï´Ù.
´ÙÀ½°ú °°ÀÌ ÇÏ¸é µË´Ï´Ù.
Ưº°ÇÏ°Ô TimeZoneÀ» ´Ù½Ã ÁöÁ¤ÇÏÁö ¾ÊÀ¸¸é GMT+09:00À¸·Î Ç¥ÇöµË´Ï´Ù.
KST·Î Ç¥ÇöÇϱâ À§ÇØ ´Ù½Ã TimeZoneÀ» ÁöÁ¤ÇÏ¿´½À´Ï´Ù.

import java.text.*;
import java.util.*;
class a {
	public static void main(String[] args) {
		final int millisPerHour = 60 * 60 * 1000;
		SimpleDateFormat fmt= new SimpleDateFormat();
		fmt=(SimpleDateFormat) DateFormat.getDateTimeInstance(
			DateFormat.FULL, DateFormat.FULL, Locale.KOREAN);
		SimpleTimeZone timeZone = new SimpleTimeZone(9*millisPerHour,"KST");
		fmt.setTimeZone(timeZone);
		long time=System.currentTimeMillis();
		String str=fmt.format(new Date(time));
		System.out.println("Date="+str);
	}
}




Follow Ups:



[ Follow Ups ] [ Post Followup ] [ ÀÚ¹Ù ¹¯°í ´äÇϱâ ]