1 0Q R1 S T7 U: V= WA X YZ Q 0[\ Q] ^_ `4 a bc d ef gh ijk lm n opqrst uv wxgetDateTimeValues Lcom/ibm/cfgassist/etc/ECommand;getDateTimeValues_prefixnames[Ljava/lang/String;getDateTimeValues_scriptLjava/lang/String; listSTDZoneslistSTDZones_prefixnameslistSTDZones_script listDSTZoneslistDSTZones_prefixnameslistDSTZones_scriptsetDateTimeValuessetDateTimeValues_prefixnamessetDateTimeValues_varlist_ParamsetDateTimeValues_scriptsetTimeZoneValuessetTimeZoneValues_prefixnamessetTimeZoneValues_varlist_ParamsetTimeZoneValues_script()VCodeLineNumberTable getECommand4(Ljava/lang/String;)Lcom/ibm/cfgassist/etc/ECommand;getInstanceECommandmain([Ljava/lang/String;)V SourceFileDateTimeCommands.java EF yz {| 12 72 :2 =2 A2 IJ,com/ibm/cfgassist/apps/cmds/DateTimeCommands L}com/ibm/cfgassist/etc/ECommandjava/lang/String 34 # determine format for time in this locale value=$(locale -k LC_TIME | grep '^t_fmt=' | cut -f2 -d'=' | cut -f2 -d'"' | cut -f1 -d':') if [[ $value = "%I" ]]; then timetype=1 elif [[ $value = "%H" ]]; then timetype=2 else timetype=1 fi # default date is current date defdate=$(date +"%m%d%Y") # default time is current time deftime=$(date +"%H""%M""%S") # determine locale type value=$(locale -k LC_TIME | grep '^d_fmt' | cut -f2 -d'=' | cut -f2 -d'"') if [ $(echo "$value" | grep ".*m.*d.*[yY]") ]; then loctype=1 elif [ $(echo "$value" | grep ".*d.*m.*[yY]") ]; then loctype=2 elif [ $(echo "$value" | grep ".*[yY].*m.*d") ]; then loctype=3 else loctype=1 fi # This discover method gets the timezone variable, $TZ, from # /etc/environment, not from the current shell environment. # That way, if reflects changes that have been made without the # user having to log out and log in again. # TZ can have the formats in the following examples: # CST6CDT (timezone only) # CST6CDT,J129,J251 (timezone, Julian dates for DST start and end, # hour and minute default to 02:00) # CST6CDT,J129/01:30,J251/01:30 (timezone, Julian dates for DST # start and end / explicit values # for hour and minute) # CST6CDT,M4.1.0,M10.5.0 (timezone, month.week.day for DST start # and end) # CST6CDT,M4.1.0/03:15,M10.5.0/03:15 (timezone, month.week.day for # DST start and end / # explicit values for hour # and minute) # This script expects the DST start and end dates and times to # be in the M format if present, otherwise it sets # if year > 2006: (defect 541866) # DST start to 02:00 a.m. the second Sunday of March and # DST end to 02:00 a.m. the first Sunday of November # if year <= 2006: # DST start to 02:00 a.m. the first Sunday of April and # DST end to 02:00 a.m. the last Sunday of October # which are the defaults for the United States. if [ `date +%Y` -gt 2006 ]; then DFLTDST=M3.2.0/02:00,M11.1.0/02:00 else DFLTDST=M4.1.0/02:00,M10.5.0/02:00 fi ENVFILE=/etc/environment # Get value of TZ variable from /etc/environment # If not defined then set zone to unknown # and set DST start and end to U.S. defaults # TZFORMAT: STNAME+4:1:0DTNAME-5:30:0,M3.1.0/03:30:0,J300/03:0:0 cat $ENVFILE|awk -F "=" ' /^TZ=/ { gsub("[+]", "", $2); split( $2, A, ","); split(A[1], ID, "[-|:|0-9]*"); gsub(ID[1], "", A[1]); split(A[1], OFFSET, ID[2]); split(OFFSET[1], STOFFSET, ":"); split(OFFSET[2], DTOFFSET, ":"); split(A[2], START, "/"); split(START[1], STARTDATE, "."); split(START[2], STARTTIME, ":"); split(A[3], FIN, "/"); split(FIN[1], ENDTDATE, "."); split(FIN[2], ENDTIME, ":"); printf("%s %s:%s:%s:%s:%s:%s:%s:%s:%s:%s:%s:%s:%s:%s:%s\n",ID[1],ID[2],STOFFSET[1],STOFFSET[2],DTOFFSET[1],DTOFFSET[2],STARTDATE[1],STARTDATE[2],STARTDATE[3],STARTTIME[1],STARTTIME[2],ENDTDATE[1],ENDTDATE[2],ENDTDATE[3],ENDTIME[1],ENDTIME[2]); }'| while read ValueA ValueB do TZ_NAME=$ValueA TZVALUES=$ValueB done if [[ -n TZVALUES ]]; then TZVALUES="::::::::::::::" fi # get list of predifined system TZ values LIST_LOCALES=`/usr/lib/nls/lstz -C |awk '{printf("%s|",$0)}'` # get Locale system TZ values LOCALE=`locale | grep LC_TIME | cut -f3 -d'_' | head -c2` if [[ -n LOCALE ]]; then LOCALE=US fi LOCALE_NAME=`/usr/lib/nls/lstz -C -c $LOCALE` LOCALES_ZONES=`/usr/lib/nls/lstz -c $LOCALE| awk 'BEGIN{ORS="|"} /^[^#]/ { gsub("[:]","%",$0); print($0);}'` echo $TZ_NAME |grep "/" if [[ $? -eq 0 ]]; then echo $LOCALES_ZONES |grep $TZ_NAME if [[ $? -ne 0 ]]; then for LOCALE in `/usr/lib/nls/lstz -C |awk '{print $1}'`;do LOCALE_NAME=`/usr/lib/nls/lstz -C -c $LOCALE` LOCALES_ZONES=`/usr/lib/nls/lstz -c $LOCALE| awk 'BEGIN{ORS="|"} /^[^#]/ { gsub("[:]","%",$0); print($0);}'` echo $LOCALES_ZONES |grep $TZ_NAME if [[ $? -eq 0 ]]; then break fi done fi fi echo "$timetype:$defdate:$deftime:$loctype:$TZ_NAME:$TZVALUES:$LIST_LOCALES:$LOCALE_NAME:$LOCALES_ZONES:" | wsmoutput -header "timetype:dateS_PROP:deftime:localeType_PROP:STID:DTID:STOffsetH:STOffsetM:DTOffsetH:DTOffsetM:DTStartMonth:DTStartWeek:DTStartDay:DTStartH:DTStartM:DTEndMonth:DTEndWeek:DTEndDay:DTEndH:DTEndM:LIST_LOCALES:LOCALE_NAME:LOCALES_ZONES:" 56 E~ 84 value=$(echo "$(dspmsg smit.cat -s 30 22 "\ (CUT0) Coordinated Universal Time (CUT)\n\ (GMT0) United Kingdom (CUT)\n\ (AZOREST1) Azores; Cape Verde (CUT -1)\n\ (FALKST2) Falkland Islands (CUT -2)\n\ (GRNLNDST3) Greenland; East Brazil (CUT -3)\n\ (AST4) Central Brazil (CUT -4)\n\ (EST5) Eastern U.S.; Colombia (CUT -5)\n\ (CST6) Central U.S.; Honduras (CUT -6)\n\ (MST7) Mountain U.S. (CUT -7)\n\ (PST8) Pacific U.S.; Yukon (CUT -8)\n\ (AST9) Alaska (CUT -9)\n\ (HST10) Hawaii; Aleutian (CUT-10)\n\ (BST11) Bering Straits (CUT-11)\n\ (NZST-12) New Zealand (CUT+12)\n\ (MET-11) Solomon Islands (CUT+11)\n\ (EET-10) Eastern Australia (CUT+10)\n\ (JST-9) Japan (CUT +9)\n\ (KORST-9) Korea (CUT +9)\n\ (WAUST-8) Western Australia (CUT +8)\n\ (TAIST-8) Taiwan (CUT +8)\n\ (BEIST-8) People's Rep. China (CUT +8)\n\ (THAIST-7) Thailand (CUT +7)\n\ (TASHST-6) Tashkent; Central Asia (CUT +6)\n\ (PAKST-5) Pakistan (CUT +5)\n\ (WST-4) Gorki; Central Asia; Oman (CUT +4)\n\ (MEST-3) Turkey (CUT +3)\n\ (SAUST-3) Saudi Arabia (CUT +3)\n\ (WET-2) Finland (CUT +2)\n\ (USAST-2) South Africa (CUT +2)\n\ (NFT-1) Norway; France (CUT +1)")" | awk '{printf("%s#",$0)}') echo "$value:" | wsmoutput -header "listzones:" 96 ;4U value=$(echo "$(dspmsg smit.cat -s 30 7 "\ (CUT0GDT) Coordinated Universal Time (CUT)\n\ (GMT0BST) United Kingdom (CUT)\n\ (AZOREST1AZOREDT) Azores; Cape Verde (CUT -1)\n\ (FALKST2FALKDT) Falkland Islands (CUT -2)\n\ (GRNLNDST3GRNLNDDT) Greenland; East Brazil (CUT -3)\n\ (AST4ADT) Central Brazil (CUT -4)\n\ (EST5EDT) Eastern U.S.; Colombia (CUT -5)\n\ (CST6CDT) Central U.S.; Honduras (CUT -6)\n\ (MST7MDT) Mountain U.S. (CUT -7)\n\ (PST8PDT) Pacific U.S.; Yukon (CUT -8)\n\ (AST9ADT) Alaska (CUT -9)\n\ (HST10HDT) Hawaii; Aleutian (CUT-10)\n\ (BST11BDT) Bering Straits (CUT-11)\n\ (NZST-12NZDT) New Zealand (CUT+12)\n\ (MET-11METDT) Solomon Islands (CUT+11)\n\ (EET-10EETDT) Eastern Australia (CUT+10)\n\ (JST-9JDT) Japan (CUT +9)\n\ (KORST-9KORDT) Korea (CUT +9)\n\ (WAUST-8WAUDT) Western Australia (CUT +8)\n\ (TAIST-8TAIDT) Taiwan (CUT +8)\n\ (BEIST-8BEIDT) People's Rep. China (CUT +8)\n\ (THAIST-7THAIDT) Thailand (CUT +7)\n\ (TASHST-6TASHDT) Tashkent; Central Asia (CUT +6)\n\ (PAKST-5PAKDT) Pakistan (CUT +5)\n\ (WST-4WDT) Gorki; Central Asia; Oman (CUT +4)\n\ (MEST-3MEDT) Turkey (CUT +3)\n\ (SAUST-3SAUDT) Saudi Arabia (CUT +3)\n\ (WET-2WET) Finland (CUT +2)\n\ (USAST-2USADT) South Africa (CUT +2)\n\ (NFT-1DFT) Norway; France (CUT +1)")" | awk '{printf("%s#",$0)}') echo "$value:" | wsmoutput -header "listzones:" <6Param >4newdatenewtime ?4 # Change Date and Time TZ=`cat /etc/environment |awk -F "=" '/^TZ=/ { print $2;}'` echo $TZ newdate=${Param_newdate} newdate=$(echo $newdate | tr -d "/") newtime=${Param_newtime} newtime=$(echo $newtime | tr -d ":") if [[ -n ${Param_newtime} ]] then HHMM=$(echo $newtime | cut -c1-4) SS=$(echo $newtime | cut -c5-6) SS="."$(echo $newtime | cut -c5-6) else HHMM=$(date +"%H""%M") SS="" fi if [[ -n ${Param_newdate} ]] then mmdd=$(echo $newdate | cut -c1-4) yyyy=$(echo $newdate | cut -c5-8) else mmdd=$(date +"%m%d") yyyy=$(date +"%Y") fi #date "$mmdd$HHMM.$SS$yyyy" date "$mmdd$HHMM$SS$yyyy" @6 B4 savedstdateschdst newdstdatesdsttz C4 tz=${Param_tz} chdst=${Param_chdst} dst=${Param_dst} savedstdates=${Param_savedstdates} newdstdates=${Param_newdstdates} # Change Timezone # If user changed DST start and end dates then include # new DST start and end dates in TZ # else, if user selected a DST timezone but did not specify # new DST start and end dates, restore the old ones # else, just set the timezone if [[ $chdst = "true" ]] then chtz "${tz},${newdstdates}" else if [[ $dst = "true" ]] then # Replace % with : in savedstdates # savedstdates=$(print $savedstdates | sed "s/%/:/g") chtz "${tz}${savedstdates}" else chtz "$tz" fi fi D6#com/ibm/cfgassist/etc/ECommandGrouplength()Iequals(Ljava/lang/Object;)Z;(Lcom/ibm/cfgassist/etc/ECommandGroup;[Ljava/lang/String;)V<(Ljava/lang/String;[Ljava/lang/String;[[Ljava/lang/String;)V!0 123456 728496 :2;4<6 =2>4?4@6 A2B4C4D6EFG*H IJGP* **** *  *  H"  '4ANKJG+H LMG( Y*H  NFG$YKY*YKY*Y KY* Y Y S!Y"SY#S$%&K*$SY&!* Y Y S'Y(SY)SY*SY+SY,S-./K*-SY/'* Hz" $',6=BGXbins!%*RSU\^bj #OP