I am trying to parse date with my specific timezone - not utc or browser. I am using
d3.timeFormat("%H:%M %p");
but this function is unsing browser timezone automatically.
d3.utcFormat("%H:%M %p"); // is using utc
I am thinking about using moment.js but don't know how. Any idea?
------UPDATE---------------------------------------
I am using unix timestamps as number to do linear scaling.
var xScale = d3.scaleLinear()
.range([0, width])
.domain([minTime, maxTime]);
and just parsing it when display it
var xAxis = d3.axisBottom()
.scale(xScale)
.ticks(7)
.tickFormat(d3.timeFormat("%H:%M %p"));
so input is e.g. 1647245248 and I want to set timezones that I get from moment.js list.
So I need to add timezone in data in unix timestamp or just in d3 display axis.