index.js
function listTimezones () {
  if (arguments.length == 0) {
    throw new Error("You must set a callback");
  }
  if (typeof arguments[arguments.length - 1] != "function") {
    throw new Error("You must set a callback");
  }
  var cb = arguments[arguments.length - 1]
    , subset = (arguments.length > 1 ? arguments[0] : null)

  return listTimezonesFolder(subset ? subset + "/" : "", subset ? path.join(TZDIR, "/" + subset) : TZDIR, function (err, tzs) {
    if (err) return cb(err);
    cb(null, tzs.sort());
  });
}
function listTimezones () {
  if (arguments.length == 0) {
    throw new Error("You must set a callback");
  }
  if (typeof arguments[arguments.length - 1] != "function") {
    throw new Error("You must set a callback");
  }
  var cb = arguments[arguments.length - 1]
    , subset = (arguments.length > 1 ? arguments[0] : null)

  return listTimezonesFolder(subset ? subset + "/" : "", subset ? path.join(TZDIR, "/" + subset) : TZDIR, function (err, tzs) {
    if (err) return cb(err);
    cb(null, tzs.sort());
  });
}
function listTimezones ( ) { if ( arguments . length == 0 ) { throw new Error ( "You must set a callback" ) ; } if ( typeof arguments [ arguments . length - 1 ] != "function" ) { throw new Error ( "You must set a callback" ) ; } var cb = arguments [ arguments . length - 1 ] , subset = ( arguments . length > 1 ? arguments [ 0 ] : null ) return listTimezonesFolder ( subset ? subset + "/" : "" , subset ? path . join ( TZDIR , "/" + subset ) : TZDIR , function ( err , tzs ) { if ( err ) return cb ( err ) ; cb ( null , tzs . sort ( ) ) ; } ) ; }
Lists the timezones that the current system can accept. It does this by going
on a recursive walk through the timezone dir and collecting filenames.
Lists the timezones that the current system can accept . It does this by going on a recursive walk through the timezone dir and collecting filenames .