(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:zonedir)
          op: assign_op.Equal
          rhs: {(DQ (/usr/share/zoneinfo))}
          spids: [24]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (C {(Id.Lit_LBracket '[')} {(Id.KW_Bang '!')} {(-d)} {($ Id.VSub_DollarName '$zonedir')} 
                  {(Id.Lit_RBracket ']')}
                )
              terminator: (Token id:Id.Op_Semi val:';' span_id:42)
            )
          ]
          action: [
            (command.Sentence
              child: 
                (command.Simple
                  words: [
                    {(echo)}
                    {(DQ ('No time zone database at ') ($ Id.VSub_DollarName '$zonedir') (.))}
                  ]
                  redirects: [
                    (redir.Redir
                      op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:55)
                      fd: -1
                      arg_word: {(2)}
                    )
                  ]
                )
              terminator: (Token id:Id.Op_Semi val:';' span_id:58)
            )
            (command.ControlFlow
              token: (Token id:Id.ControlFlow_Exit val:exit span_id:60)
              arg_word: {(1)}
            )
          ]
          spids: [30 44]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (C {(Id.Lit_LBracket '[')} {(-d)} {(DQ ($ Id.VSub_DollarName '$zonedir') (/posix))} 
                  {(Id.Lit_RBracket ']')}
                )
              terminator: (Token id:Id.Op_Semi val:';' span_id:80)
            )
          ]
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:zonedir)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_DollarName '$zonedir') (/posix)}
                  spids: [85]
                )
              ]
            )
          ]
          spids: [67 82]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (C {(Id.Lit_LBracket '[')} {($ Id.VSub_Pound '$#')} {(-eq)} {(0)} {(Id.Lit_RBracket ']')})
              terminator: (Token id:Id.Op_Semi val:';' span_id:107)
            )
          ]
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:timezone)
                  op: assign_op.Equal
                  rhs: {(DQ (UTC))}
                  spids: [112]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:mixedzone)
                  op: assign_op.Equal
                  rhs: {(DQ (UTC))}
                  spids: [118]
                )
              ]
            )
          ]
          spids: [95 109]
        )
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (C {(Id.Lit_LBracket '[')} {(DQ ($ Id.VSub_Number '$1'))} {(Id.Lit_Equals '=')} 
                  {(DQ (list))} {(Id.Lit_RBracket ']')}
                )
              terminator: (Token id:Id.Op_Semi val:';' span_id:139)
            )
          ]
          action: [
            (command.Pipeline
              children: [
                (command.Subshell
                  command_list: 
                    (command.CommandList
                      children: [
                        (C {(echo)} {(DQ ('All known time zones and regions defined on this system:'))})
                        (C {(cd)} {($ Id.VSub_DollarName '$zonedir')})
                        (command.Pipeline
                          children: [
                            (C {(find)} {(-L)} {(Id.Lit_Star '*')} {(-type)} {(f)} {(-print)})
                            (C {(xargs)} {(-n)} {(2)})
                            (C {(awk)} 
                              {
                                (SQ 
                                  (Token
                                    id: Id.Lit_Chars
                                    val: '{ printf "  %-38s %-38s\\n", $1, $2 }'
                                    span_id: 185
                                  )
                                )
                              }
                            )
                          ]
                          negated: F
                        )
                      ]
                    )
                )
                (C {(more)})
              ]
              negated: F
            )
            (command.ControlFlow
              token: (Token id:Id.ControlFlow_Exit val:exit span_id:197)
              arg_word: {(0)}
            )
          ]
          spids: [123 141]
        )
      ]
      else_action: [
        (command.ShAssignment
          pairs: [
            (assign_pair
              lhs: (sh_lhs_expr.Name name:region)
              op: assign_op.Equal
              rhs: 
                {
                  (DQ 
                    (command_sub
                      left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:207)
                      command_list: 
                        (command.CommandList
                          children: [(C {(dirname)} {($ Id.VSub_Number '$1')})]
                        )
                    )
                  )
                }
              spids: [205]
            )
          ]
        )
        (command.ShAssignment
          pairs: [
            (assign_pair
              lhs: (sh_lhs_expr.Name name:zone)
              op: assign_op.Equal
              rhs: 
                {
                  (DQ 
                    (command_sub
                      left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:217)
                      command_list: 
                        (command.CommandList
                          children: [(C {(basename)} {($ Id.VSub_Number '$1')})]
                        )
                    )
                  )
                }
              spids: [215]
            )
          ]
        )
        (command.ShAssignment
          pairs: [
            (assign_pair
              lhs: (sh_lhs_expr.Name name:matchcnt)
              op: assign_op.Equal
              rhs: 
                {
                  (DQ 
                    (command_sub
                      left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:241)
                      command_list: 
                        (command.CommandList
                          children: [
                            (command.Pipeline
                              children: [
                                (C {(find)} {(-L)} {($ Id.VSub_DollarName '$zonedir')} {(-name)} 
                                  {($ Id.VSub_DollarName '$zone')} {(-type)} {(f)} {(-print)}
                                )
                                (C {(wc)} {(-l)})
                                (C {(sed)} 
                                  {(SQ (Token id:Id.Lit_Chars val:'s/[^[:digit:]]//g' span_id:270))}
                                )
                              ]
                              negated: F
                            )
                          ]
                        )
                    )
                  )
                }
              spids: [239]
            )
          ]
        )
        (command.If
          arms: [
            (if_arm
              cond: [
                (command.Sentence
                  child: 
                    (C {(Id.Lit_LBracket '[')} {(DQ ($ Id.VSub_DollarName '$matchcnt'))} {(-gt)} {(0)} 
                      {(Id.Lit_RBracket ']')}
                    )
                  terminator: (Token id:Id.Op_Semi val:';' span_id:296)
                )
              ]
              action: [
                (command.If
                  arms: [
                    (if_arm
                      cond: [
                        (command.Sentence
                          child: 
                            (C {(Id.Lit_LBracket '[')} {($ Id.VSub_DollarName '$matchcnt')} {(-gt)} {(1)} 
                              {(Id.Lit_RBracket ']')}
                            )
                          terminator: (Token id:Id.Op_Semi val:';' span_id:317)
                        )
                      ]
                      action: [
                        (command.Simple
                          words: [
                            {(echo)}
                            {
                              (DQ 
                                (word_part.EscapedLiteral
                                  token: (Token id:Id.Lit_EscapedChar val:'\\"' span_id:325)
                                ) ($ Id.VSub_DollarName '$zone') 
                                (word_part.EscapedLiteral
                                  token: (Token id:Id.Lit_EscapedChar val:'\\"' span_id:327)
                                ) (' matches more than one possible time zone record.')
                              )
                            }
                          ]
                          redirects: [
                            (redir.Redir
                              op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:331)
                              fd: -1
                              arg_word: {(2)}
                            )
                          ]
                        )
                        (command.Simple
                          words: [
                            {(echo)}
                            {(DQ ("Please use 'list' to see all known regions and time zones"))}
                          ]
                          redirects: [
                            (redir.Redir
                              op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:341)
                              fd: -1
                              arg_word: {(2)}
                            )
                          ]
                        )
                        (command.ControlFlow
                          token: (Token id:Id.ControlFlow_Exit val:exit span_id:345)
                          arg_word: {(1)}
                        )
                      ]
                      spids: [305 319]
                    )
                  ]
                )
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:match)
                      op: assign_op.Equal
                      rhs: 
                        {
                          (DQ 
                            (command_sub
                              left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:355)
                              command_list: 
                                (command.CommandList
                                  children: [
                                    (C {(find)} {(-L)} {($ Id.VSub_DollarName '$zonedir')} {(-name)} 
                                      {($ Id.VSub_DollarName '$zone')} {(-type)} {(f)} {(-print)}
                                    )
                                  ]
                                )
                            )
                          )
                        }
                      spids: [353]
                    )
                  ]
                )
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:mixedzone)
                      op: assign_op.Equal
                      rhs: {(DQ ($ Id.VSub_DollarName '$zone'))}
                      spids: [375]
                    )
                  ]
                )
              ]
              spids: [282 298]
            )
          ]
          else_action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:mixedregion)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (DQ 
                        (command_sub
                          left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:394)
                          command_list: 
                            (command.CommandList
                              children: [
                                (command.Pipeline
                                  children: [
                                    (C {(echo)} 
                                      {
                                        (braced_var_sub
                                          token: (Token id:Id.VSub_Name val:region span_id:398)
                                          suffix_op: 
                                            (suffix_op.Unary
                                              op_id: Id.VOp1_Percent
                                              arg_word: 
                                                {
                                                  (braced_var_sub
                                                    token: 
                                                      (Token
                                                        id: Id.VSub_Name
                                                        val: region
                                                        span_id: 401
                                                      )
                                                    suffix_op: 
                                                      (suffix_op.Unary
                                                        op_id: Id.VOp1_Pound
                                                        arg_word: {('?')}
                                                      )
                                                  )
                                                }
                                            )
                                        )
                                      }
                                    )
                                    (C {(tr)} 
                                      {(SQ (Token id:Id.Lit_Chars val:'[[:lower:]]' span_id:414))} {(SQ (Token id:Id.Lit_Chars val:'[[:upper:]]' span_id:418))}
                                    )
                                  ]
                                  negated: F
                                )
                              ]
                            )
                        ) ('                 ') 
                        (command_sub
                          left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:423)
                          command_list: 
                            (command.CommandList
                              children: [
                                (command.Pipeline
                                  children: [
                                    (C {(echo)} 
                                      {
                                        (braced_var_sub
                                          token: (Token id:Id.VSub_Name val:region span_id:427)
                                          suffix_op: 
                                            (suffix_op.Unary
                                              op_id: Id.VOp1_Pound
                                              arg_word: {('?')}
                                            )
                                        )
                                      }
                                    )
                                    (C {(tr)} 
                                      {(SQ (Token id:Id.Lit_Chars val:'[[:upper:]]' span_id:437))} {(SQ (Token id:Id.Lit_Chars val:'[[:lower:]]' span_id:441))}
                                    )
                                  ]
                                  negated: F
                                )
                              ]
                            )
                        )
                      )
                    }
                  spids: [392]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:mixedzone)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (DQ 
                        (command_sub
                          left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:449)
                          command_list: 
                            (command.CommandList
                              children: [
                                (command.Pipeline
                                  children: [
                                    (C {(echo)} 
                                      {
                                        (braced_var_sub
                                          token: (Token id:Id.VSub_Name val:zone span_id:453)
                                          suffix_op: 
                                            (suffix_op.Unary
                                              op_id: Id.VOp1_Percent
                                              arg_word: 
                                                {
                                                  (braced_var_sub
                                                    token: 
                                                      (Token
                                                        id: Id.VSub_Name
                                                        val: zone
                                                        span_id: 456
                                                      )
                                                    suffix_op: 
                                                      (suffix_op.Unary
                                                        op_id: Id.VOp1_Pound
                                                        arg_word: {('?')}
                                                      )
                                                  )
                                                }
                                            )
                                        )
                                      }
                                    )
                                    (C {(tr)} 
                                      {(SQ (Token id:Id.Lit_Chars val:'[[:lower:]]' span_id:467))} {(SQ (Token id:Id.Lit_Chars val:'[[:upper:]]' span_id:471))}
                                    )
                                  ]
                                  negated: F
                                )
                              ]
                            )
                        ) (' ') ('               ') 
                        (command_sub
                          left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:477)
                          command_list: 
                            (command.CommandList
                              children: [
                                (command.Pipeline
                                  children: [
                                    (C {(echo)} 
                                      {
                                        (braced_var_sub
                                          token: (Token id:Id.VSub_Name val:zone span_id:481)
                                          suffix_op: 
                                            (suffix_op.Unary
                                              op_id: Id.VOp1_Pound
                                              arg_word: {('?')}
                                            )
                                        )
                                      }
                                    )
                                    (C {(tr)} 
                                      {(SQ (Token id:Id.Lit_Chars val:'[[:upper:]]' span_id:491))} {(SQ (Token id:Id.Lit_Chars val:'[[:lower:]]' span_id:495))}
                                    )
                                  ]
                                  negated: F
                                )
                              ]
                            )
                        )
                      )
                    }
                  spids: [447]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {(Id.Lit_LBracket '[')} {(DQ ($ Id.VSub_DollarName '$mixedregion'))} 
                          {(Id.KW_Bang '!') (Id.Lit_Equals '=')} {(DQ (.))} {(Id.Lit_RBracket ']')}
                        )
                      terminator: (Token id:Id.Op_Semi val:';' span_id:520)
                    )
                  ]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:match)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (DQ 
                                (command_sub
                                  left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:539)
                                  command_list: 
                                    (command.CommandList
                                      children: [
                                        (C {(find)} {(-L)} 
                                          {($ Id.VSub_DollarName '$zonedir') (/) 
                                            ($ Id.VSub_DollarName '$mixedregion')
                                          } {(-type)} {(f)} {(-name)} {($ Id.VSub_DollarName '$mixedzone')} {(-print)}
                                        )
                                      ]
                                    )
                                )
                              )
                            }
                          spids: [537]
                        )
                      ]
                    )
                  ]
                  spids: [503 522]
                )
              ]
              else_action: [
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:match)
                      op: assign_op.Equal
                      rhs: 
                        {
                          (DQ 
                            (command_sub
                              left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:566)
                              command_list: 
                                (command.CommandList
                                  children: [
                                    (C {(find)} {(-L)} {($ Id.VSub_DollarName '$zonedir')} {(-name)} 
                                      {($ Id.VSub_DollarName '$mixedzone')} {(-type)} {(f)} {(-print)}
                                    )
                                  ]
                                )
                            )
                          )
                        }
                      spids: [564]
                    )
                  ]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {(Id.Lit_LBracket '[')} {(-z)} {(DQ ($ Id.VSub_DollarName '$match'))} 
                          {(Id.Lit_RBracket ']')}
                        )
                      terminator: (Token id:Id.Op_Semi val:';' span_id:606)
                    )
                  ]
                  action: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (C {(Id.Lit_LBracket '[')} {(Id.KW_Bang '!')} {(-z)} 
                                  {
                                    (command_sub
                                      left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:623)
                                      command_list: 
                                        (command.CommandList
                                          children: [
                                            (C {(find)} {(-L)} {($ Id.VSub_DollarName '$zonedir')} 
                                              {(-name)} {($ Id.VSub_DollarName '$mixedzone')} {(-type)} {(d)} {(-print)}
                                            )
                                          ]
                                        )
                                    )
                                  } {(Id.Lit_RBracket ']')}
                                )
                              terminator: (Token id:Id.Op_Semi val:';' span_id:643)
                            )
                          ]
                          action: [
                            (command.Simple
                              words: [
                                {(echo)}
                                {
                                  (DQ ('The region ') 
                                    (word_part.EscapedLiteral
                                      token: (Token id:Id.Lit_EscapedChar val:'\\"' span_id:652)
                                    ) ($ Id.VSub_Number '$1') 
                                    (word_part.EscapedLiteral
                                      token: (Token id:Id.Lit_EscapedChar val:'\\"' span_id:654)
                                    ) (' has more than one time zone. ')
                                  )
                                }
                              ]
                              redirects: [
                                (redir.Redir
                                  op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:658)
                                  fd: -1
                                  arg_word: {(2)}
                                )
                              ]
                            )
                          ]
                          spids: [615 645]
                        )
                      ]
                      else_action: [
                        (command.Simple
                          words: [
                            {(echo)}
                            {
                              (DQ ("Can't find an exact match for ") 
                                (word_part.EscapedLiteral
                                  token: (Token id:Id.Lit_EscapedChar val:'\\"' span_id:672)
                                ) ($ Id.VSub_Number '$1') 
                                (word_part.EscapedLiteral
                                  token: (Token id:Id.Lit_EscapedChar val:'\\"' span_id:674)
                                ) ('. ')
                              )
                            }
                          ]
                          redirects: [
                            (redir.Redir
                              op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:678)
                              fd: -1
                              arg_word: {(2)}
                            )
                          ]
                        )
                      ]
                    )
                    (command.Simple
                      words: [
                        {(echo)}
                        {(DQ ("Please use 'list' to see all known regions and time zones."))}
                      ]
                      redirects: [
                        (redir.Redir
                          op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:691)
                          fd: -1
                          arg_word: {(2)}
                        )
                      ]
                    )
                    (command.ControlFlow
                      token: (Token id:Id.ControlFlow_Exit val:exit span_id:695)
                      arg_word: {(1)}
                    )
                  ]
                  spids: [594 608]
                )
              ]
            )
          ]
        )
        (command.ShAssignment
          pairs: [
            (assign_pair
              lhs: (sh_lhs_expr.Name name:timezone)
              op: assign_op.Equal
              rhs: {(DQ ($ Id.VSub_DollarName '$match'))}
              spids: [706]
            )
          ]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:nicetz)
          op: assign_op.Equal
          rhs: 
            {
              (command_sub
                left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:715)
                command_list: 
                  (command.CommandList
                    children: [
                      (command.Pipeline
                        children: [
                          (C {(echo)} {($ Id.VSub_DollarName '$timezone')})
                          (C {(sed)} {(DQ ('s|') ($ Id.VSub_DollarName '$zonedir') ('/||g'))})
                        ]
                        negated: F
                      )
                    ]
                  )
              )
            }
          spids: [714]
        )
      ]
    )
    (C {(echo)} 
      {(It) (word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:"\\'" span_id:738)) (s)} 
      {
        (command_sub
          left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:741)
          command_list: 
            (command.CommandList
              children: [
                (command.Simple
                  words: [
                    {(date)}
                    {(SQ (Token id:Id.Lit_Chars val:'+%A, %B %e, %Y, at %l:%M %p' span_id:748))}
                  ]
                  more_env: [(env_pair name:TZ val:{($ Id.VSub_DollarName '$timezone')} spids:[742])]
                )
              ]
            )
        )
      } {(Id.KW_In in)} {($ Id.VSub_DollarName '$nicetz')}
    )
    (command.ControlFlow token:(Token id:Id.ControlFlow_Exit val:exit span_id:757) arg_word:{(0)})
  ]
)