 public struct TimeBuffer: CustomStringConvertible {
 
   public var buffer: CTime
+  public var _utc = false
 
   public init(secondsSinceEpoch: Int) {
     var n = secondsSinceEpoch
     var b = tm()
-    gmtime_r(&n, &b)
+    localtime_r(&n, &b)
     buffer = b
   }
 

  public var description: String {
    return "TimeBuffer(year: \(year), month: \(month), day: \(day), " +
        "hour: \(hour), minute: \(minute), second: \(second), " +
        "weekday: \(weekday), yearday: \(yearday), isDst: \(isDst))"
  }

}

    self.init(secondsSinceEpoch: time(nil))
  }

  public init(buffer: CTime, utc: Bool = false) {
    self.buffer = buffer
    _utc = utc
  }

  public var isUtc: Bool { return _utc }

  public var isDst: Bool { return buffer.tm_isdst == 1 }

