1992.5.13


SUBJECT: ROK timezoneÀÇ KDT,KST ¿¡ °üÇÏ¿©

MEANING OF THIS MEMO:

CONTENTS:
      0. KDT,KSTÀÇ ÀǹÌ
      1. /usr/share/lib/zoneinfo/asia file
      2. zicÀÇ »ç¿ë
      3. Daylight time settingÀ» Á¦°ÅÇÏ´Â ¹æ¹ý
      4. Âü°íÀÚ·á

DESCRIPTION :

      0. KDT¿Í KSTÀÇ ÀǹÌ
         * date command¸¦ »ç¿ëÇÒ ¶§ displayµÇ´Â lineÀÇ ³¡¿¡ time zoneÀÇ ¾à¾î°¡ Ç¥½ÃµÈ´Ù.
         * time zone ROKÀÇ ¾à¾î´Â ÀϹÝÀûÀ¸·Î KST¸¦ »ç¿ëÇÑ´Ù.
           ÀÌ´Â Korean Standard Time Á¤µµÀÇ ÀǹÌÀÏ °ÍÀÌ´Ù.
           ±×·±µ¥ °£È¤ KDT¶ó´Â ¾àÀÚ°¡ displayµÇ´Â °æ¿ì°¡ ÀÖ´Ù. 
           ÀÌ´Â Korea Daylight TimeÀÇ Àǹ̷Πdaylight saving time
           Áï summer timeÀ» »ç¿ëÇÒ ¶§ Ç¥½ÃµÇ´Â ¾à¾îÀÌ´Ù.
         * time zone ¼³Á¤¿¡ °ü·ÃµÈ default °ªµéÀº /usr/share/lib/zoneinfo/asia ¿¡ ÀÖ°í
           Ȥ½Ã¶óµµ time zoneÀÇ º¯°æ½Ã¿¡´Â ÀÌ fileÀÇ °ªµéÀ» º¯°æÇÏ¿© zicÀ» »ç¿ëÇÏ¸é µÈ´Ù.
         * ÇÑ ¶§ summer timeÀ» ½Ç½Ã Çß´ø °ü°è·Î
           aisa fileÀÇ ROK zone¿¡´Â default·Î daylight timeÀÌ settingµÇ¾î ÀÖÀ¸¸ç,
           SunOS installÀÇ time zone setting½Ã¿¡µµ ÀÌ daylight °ªÀÌ settingµÈ´Ù°í
           ÃßÁ¤µÈ´Ù.
           ÀÌ·¯ÇÑ ÀÌÀ¯·Î date command »ç¿ë½Ã KST¿Í KDT°¡ È¥¿ëµÇ´Â °æ¿ì°¡ ¹ß»ýÇÏ°Ô µÈ´Ù.
         * ÇöÀç daylight time »ç¿ëÀÌ ºÒÇÊ¿äÇÔ¿¡µµ SunOS¿¡¼­ default·Î settingµÇ¾î
           5¿ù 2°ÁÖ ÀÏ¿äÀÏ 02:00ºÎÅÍ 10¿ù 2°ÁÖ ÀÏ¿äÀÏ 02:00½Ã ±îÁö¸¦
           daylight saving (summer timeÈ­)ÇÏ°í ÀÖ´Ù.
           ÀÌ ±â°£ Áß¿¡ date command ¸¦ ¼öÇàÇϸé KDT°¡ displayµÇ´Â °ÍÀÌ´Ù.
         * µû¶ó¼­ time zone »ç¿ë¿¡¼­
           daylight savingÀÇ ¿µÇâÀ» Á¦°ÅÇÏ´Â °ÍÀÌ ¿øÄ¢ÀÌ µÉ °ÍÀÌ´Ù.
           Áï  KDT°¡ displayµÇ´Â °æ¿ì°¡ ¾øµµ·Ï ÇÏ¿©¾ß ÇÑ´Ù. 
           ƯÈ÷ date¸¦ checkÇÏ¿© À̸¦ ±âº»À¸·Î ¾î¶² ÀÛ¾÷À» ¼öÇàÇÏ´Â siteÀÇ °æ¿ì¶ó¸é 
           daylight timeÀÌ ¼öÇàµÇ´Â °ÍÀ» ¸·¾ÆÁÖ´Â ÀÛ¾÷À» ÇØ ÁÖ¾î¾ß ÇÑ´Ù.
           ÀÌ´Â 2.¿¡¼­ ¼³¸íµÉ °ÍÀÌ´Ù.

      1. /usr/share/lib/zoneinfo/asia Áß¿¡¼­ time zone ROK ÀÇ display format
         * /usr/share/lib/zoneinfo/asia fileÀº °¢ time zoneÀÌ »ç¿ëÇÒ default Á¤º¸°¡ ÀÖÀ½.
         * ¾Æ·¡ ¼³¸íµÇ´Â ¼¼ °¡Áö formatµéÀº ±× ¼ø¼­¿¡ »ó°ü ¾øÀÌ ¼³Á¤µÉ ¼ö ÀÖ´Ù.
         * Rule line format :
                  # Rule  NAME  FROM  TO  TYPE   IN   ON      AT    SAVE  LETTER/S
                  Rule    ROK   1987  max   -    May  Sun<=14 2:00  1:00    D
                  Rule    ROK   1987  max   -    Oct  Sun<=14 3:00   0      S
           - ÀÌ´Â ROK¶ó´Â time zoneÀÌ  87³â ÀÌÈÄ·Î  ¸Å³â 5¿ù 2°ÁÖ ÀÏ¿äÀÏ 02:00ºÎÅÍ
             10¿ù 2°ÁÖ ÀÏ¿äÀÏ 02:00½Ã ±îÁö¸¦
             daylight saving (summer timeÈ­)ÇÑ´Ù´Â ÀǹÌ.
           - LETTER field´Â 
             time zoneÀÇ ¾àÀÚ(abbreviation) Áß¿¡¼­ º¯¼öºÎºÐ¿¡ ¼³Á¤µÉ °ªÀ» ¼³Á¤ÇÏ´Â °÷.
         * Zone line format :
                   # Zone  NAME  GMTOFF  RULES/SAVE  FORMAT  [UNTIL]
                   Zone     ROK    9:00    ROK        K%sT
           - NAME field´Â time zoneÀÇ À̸§À» ¼³Á¤Çϴµ¥ »ç¿ëµÇ¸ç,
                 ¶ÇÇÑ ¿©±â¿¡ ¼³Á¤µÈ À̸§Àº zone¿¡ ´ëÇÑ time conversion Á¤º¸¸¦
                 ¸¸µé¶§ »ç¿ëµÈ´Ù.
           - GMTOFF field´Â zoneÀÇ standard timeÀ» ¾ò±â À§ÇØ 
                 GMT¿¡ ´õÇϰųª »¬ ½Ã°£À» ¼³Á¤ÇÑ´Ù.
           - RULES/SAVE field´Â 
                 time zone ¿¡ Àû¿ëµÇ´Â Rule ÀÇ NAMEÀ» ¼³Á¤Çϰųª
                 local standard time ¿¡ ´õÇÒ ½Ã°£À» ¼³Á¤Çϱ⵵ ÇÑ´Ù.
           - FORMAT field¿¡¼± 
                 ¾ÕÀÇ Lule line formatÀÇ LETTER field¿¡¼­ ¼³Á¤µÈ º¯¼öºÎºÐÀÇ °ªÀ»
                 %s ¿¡ ´ëÄ¡ÇÑ´Ù.  µû¶ó¼­ À§ÀÇ ¿¹¿¡ µû¸¥´Ù¸é 
                 date command »ç¿ë½Ã KST or KDT°¡ displayµÉ °ÍÀÌ´Ù.
         * Link line format :
                    # Link    LINK-FORM   LINK-TO
                    Link      ROK         localtime
           - LINK-FORM field¿¡¼± 
                 Zone lineÀÇ NAME field¿¡ ¼³Á¤µÈ °ªÀÌ ±â·ÏµÈ´Ù.
           - LINK-TO field¿¡¼± 
                 zone ¿¡ ´ëÇÑ alternate nameÀ¸·Î¼­ »ç¿ëµÉ À̸§À» ±â·ÏÇÑ´Ù.
                 À§ÀÇ ¿¹¿¡¼­´Â time zoneÀÎ ROK¸¦ local timeÀ¸·Î »ç¿ëÇÑ´Ù´Â ÀǹÌÀÌ´Ù.

      2. zic
         * time zone compiler
         * zicÀº command line¼­ ÁÖ¾îÁø file·Î ºÎÅÍ text¸¦ Àоîµé¿© ¿©±â¼­ ¸í½ÃµÈ
           time conversion information fileÀ» ¸¸µç´Ù.
           Áï 1.¿¡¼­ ¼³¸íÇÑ ¼¼ °¡Áö line formatÀ¸·Î inputÀ» ¹Þ¾Æµé¿© ±× Áß NAME field¿¡
           ¼³Á¤µÈ À̸§À¸·Î fileÀ» ¸¸µç´Ù.
         * ¸¸µå´Â °÷Àº default·Î /usr/share/lib/zoneinfoÀÌ´Ù.
         * filenameÀÌ '-'¶ó¸é  standard inputÀÌ ÀÐÇôÁø´Ù.
         * comment out µÈ ºÎºÐÀº Çؼ®ÇÏÁö ¾Ê´Â´Ù.

      3. Daylight time settingÀ» Á¦°ÅÇÏ´Â ¹æ¹ý
         * ÀÌ ¹æ¹ýÀº ¿©·¯°¡Áö°¡ ÀÖÀ» ¼ö ÀÖ´Ù. ÆíÇÏ´Ù°í »ý°¢µÇ´Â ¹æ¹ý ÅÃÇÏ¸é µÉ °Í.
         * ¹æ¹ý 1 :
           -  # cat > k
              Zone Korea 9:00 - KST
              ^D
           -  # zic k        ( ÀÌ´Â /usr/share/lib/zoneinfo ¹Ø¿¡ 
                                            Korea¶ó´Â À̸§ÀÇ fileÀ» ¸¸µç´Ù.)
           -  # cd /usr/share/lib/zoneinfo
           -  # rm localtime    ( local timeÀÌ ±âÁ¸ÀÇ time zoneÀ¸·Î 
                                                hard linkµÈ °ÍÀ» ²÷´Â °ÍÀÌ´Ù.)
           -  # ln Korea localtime
           -  # tzsetup ( ÀÌ´Â SunOS 4.0 ÀÌÀü version¿¡¼­ »ç¿ëÇÑ´Ù. 
                            SunOS 4.0 ÀÌÀü¿¡´Â gettimeofday()¶ó´Â system callÀ»
                            »ç¿ëÇÏ¿© kernel·Î ºÎÅÍ time zone informationÀ» ¾ò±â ¶§¹®¿¡
                            tzsetupÀ» »ç¿ëÇÑ´Ù )
           -  # zdump Korea ( ÀÌ´Â Korea¶ó´Â zonenameÀÇ current timeÀ» º¸¿©ÁØ´Ù.
                                 Ưº°ÇÑ ¿ëµµ°¡ ÀÖ´Â °Í °°Áö ¾ÊÀ½. »ç¿ëÄ¡ ¾Ê¾Æµµ ¹«¹æ )
           - example:
               sparc# date
               1992³â05¿ù13ÀÏ(¼ö) 17½Ã19ºÐ40ÃÊ KST
               sparc# date 8809090900
               1988³â09¿ù09ÀÏ(±Ý) 09½Ã00ºÐ00ÃÊ KDT
               sparc# cat > /tmp/k
               Zone Korea 9:00 - KST
               sparc# zic /tmp/k
               sparc# ls -li localtime ROK Korea
               4726 -rw-r--r--  1 root           55 Sep  9 09:01 Korea
               4728 -rw-r--r--  2 root           76 May 13  1992 ROK
               4728 -rw-r--r--  2 root           76 May 13  1992 localtime
               sparc# rm localtime
               sparc# ln Korea localtime
               sparc# ls -li localtime ROK Korea
               4726 -rw-r--r--  2 root           55 Sep  9 08:01 Korea
               4728 -rw-r--r--  1 root           76 May 13  1992 ROK
               4726 -rw-r--r--  2 root           55 Sep  9 08:01 localtime
               sparc# date
               1988³â09¿ù09ÀÏ(±Ý) 08½Ã02ºÐ26ÃÊ KST
               sparc# zdump Korea
               Korea  Fri Sep  9 08:02:46 1988 KST

         * ¹æ¹ý 2 :
           - # cd /usr/share/lib/zoneinfo 
           - 1.¿¡¼­ ¿¹·Î µç asia fileÀÇ ¼¼ °¡Áö line formatÀÇ °ª´ë·Î aisa fileÀ» editÇÑ´Ù.
             ´Ù¸¸ Rule line format Áß daylight lineÀ» comment outÇØ ÁÖ¸é µÈ´Ù.
                      # Rule  NAME  FROM  TO  TYPE   IN   ON      AT    SAVE  LETTER/S
                      #Rule    ROK   1987  max   -    May  Sun<=14 2:00  1:00    D
                      Rule    ROK   1987  max   -    Oct  Sun<=14 3:00   0      S
           - # rm localtime ( ±âÁ¸ »ç¿ëÇÏ´ø time zone nameÀÌ ROK°¡ ¾Æ´Ñ °æ¿ì¸¸ ÇØ´çµÊ)
           - # grep ROK asia | zic -
           - example:
                 (¹æ¹ý 1 ÀÇ example¿¡¼­ °è¼Ó ÀÛ¾÷ÇÑ °ÍÀÓ.)
               sparc# cd /usr/share/lib/zoneinfo 
               sparc# grep ROK asia
               Rule   ROK     1987    1988    -       May     Sun<=14 2:00    1:00    D
               Rule   ROK     1989    max     -       Oct     Sun<=14 3:00    0       S
               Zone   ROK             9:00    ROK             K%sT
               Link      ROK         localtime
               sparc# vi asia                 ( daylight °ü·Ã Rule lineÀ» comment outÇÑ´Ù)
               sparc# grep ROK asia
               #Rule   ROK     1987    1988    -       May     Sun<=14 2:00    1:00    D
               Rule   ROK     1989    max     -       Oct     Sun<=14 3:00    0       S
               Zone   ROK             9:00    ROK             K%sT
               Link      ROK         localtime
               sparc# grep ROK asia | zic -   ( time zone nameÀÌ ROK·Î »ý¼ºµÊ )
               sparc# rm localtime            ( time zone nameÀÌ Korea·Î »ç¿ëµÇ°í Àֱ⠶§¹®)
               /usr/share/lib/zoneinfo
               sparc# ln ROK localtime
               sparc# date
               1988³â09¿ù09ÀÏ(±Ý) 08½Ã14ºÐ10ÃÊ KST
               sparc# zdump ROK
               ROK  Fri Sep  9 08:47:03 1988 KST

      4. Âü°íÀÚ·á
          zic(8) tzsetup(8) zdump(8)

  Revision History
  Updated       on May 13 ,1992