title: Why does one-row xts object not get a timezone? (why does it ignore/override the default argument)
body: <p>Frustrated by a unit test complaining, I narrowed it down to one <code>xts</code> object has timezone set to "UTC", the other has it set to "".</p>
  
  <p>And then I've narrowed it down further to it seems to be creating an xts object with one row, compared to with 2+ rows:</p>
  
  <pre><code>&gt; str(xts( c(1,2), as.POSIXct("2015-01-01 00:00:00")+0:1))
  An ‘xts’ object on 2015-01-01/2015-01-01 00:00:01 containing:
    Data: num [1:2, 1] 1 2
    Indexed by objects of class: [POSIXct,POSIXt] TZ: UTC
    xts Attributes:  
   NULL
  
  &gt; str(xts( c(1), as.POSIXct("2015-01-01 00:00:01")))
  An ‘xts’ object on 2015-01-01 00:00:01/2015-01-01 00:00:01 containing:
    Data: num [1, 1] 1
    Indexed by objects of class: [POSIXct,POSIXt] TZ: 
    xts Attributes:  
   NULL
  </code></pre>
  
  <p>Below is the <code>xts</code> constructor. You can see the <code>tzone</code> argument gets initialized to <code>Sys.getenv("TZ")</code>, which evaluates to "UTC". So I'm confused why <code>tzone</code> would ever end up as "", based on the contents of <code>x</code>.</p>
  
  <pre><code>function (x = NULL, order.by = index(x), frequency = NULL, unique = TRUE, 
      tzone = Sys.getenv("TZ"), ...) 
  {
      if (is.null(x) &amp;&amp; missing(order.by)) 
          return(structure(.xts(, 0), index = integer()))
      if (!timeBased(order.by)) 
          stop("order.by requires an appropriate time-based object")
      if (inherits(order.by, "dates")) 
          tzone &lt;- ""
      if (inherits(order.by, "Date")) {
          if (!missing(tzone)) 
              warning(paste(sQuote("tzone"), "setting ignored for Date indexes"))
          tzone &lt;- "UTC"
      }
      if (NROW(x) &gt; 0 &amp;&amp; NROW(x) != length(order.by)) 
          stop("NROW(x) must match length(order.by)")
      orderBy &lt;- class(order.by)
      if (inherits(order.by, "Date")) {
          order.by &lt;- .POSIXct(unclass(order.by) * 86400, tz = tzone)
      }
      if (!isOrdered(order.by, strictly = !unique)) {
          indx &lt;- order(order.by)
          if (!is.null(x)) {
              if (NCOL(x) &gt; 1 || is.matrix(x) || is.data.frame(x)) {
                  x &lt;- x[indx, , drop = FALSE]
              }
              else x &lt;- x[indx]
          }
          order.by &lt;- order.by[indx]
      }
      if (!is.null(x) || length(x) != 0) {
          x &lt;- as.matrix(x)
      }
      else x &lt;- numeric(0)
      if (orderBy == "timeDate" &amp;&amp; missing(tzone)) {
          tzone &lt;- order.by@FinCenter
      }
      else if (!is.null(attr(order.by, "tzone")) &amp;&amp; missing(tzone)) 
          tzone &lt;- attr(order.by, "tzone")
      if (inherits(order.by, "dates")) 
          index &lt;- as.numeric(as.POSIXct(strptime(as.character(order.by), 
              "(%m/%d/%y %H:%M:%S)")))
      else index &lt;- as.numeric(as.POSIXct(order.by))
      x &lt;- structure(.Data = x, index = structure(index, tzone = tzone, 
          tclass = orderBy), class = c("xts", "zoo"), .indexCLASS = orderBy, 
          tclass = orderBy, .indexTZ = tzone, tzone = tzone, ...)
      if (!is.null(attributes(x)$dimnames[[1]])) 
          dimnames(x) &lt;- dimnames(x)
      x
  }
  </code></pre>