d3 utc axis

HTML

<body>
</body>

JavaScript

// 1 hour in ms
var hr = 1000 * 60 ;

// axis/scale domain is set [0ms, 8hrs]
// which should appear in the axis as:
// [1/1/1970 12:00am, 1/1/1970 8:00am]
var scale = d3.time.scale.utc()
 .domain([0, 24*hr])
 .range([0, 500]);

var axis = d3.svg.axis()
 .orient('bottom')
 .scale(scale);

d3.select("body").append("svg")
    .attr("width", 800)
    .attr("height", 50)
  .append("g")
    .call(axis);