Toggle between timecode->raw->raw(locale)->seconds timestamp formats.

Change-Id: Ie422f079f4b4f08f3aaeadada3e49912d9226517
diff --git a/ui/src/frontend/gridline_helper.ts b/ui/src/frontend/gridline_helper.ts
index 00045a1..8342f95 100644
--- a/ui/src/frontend/gridline_helper.ts
+++ b/ui/src/frontend/gridline_helper.ts
@@ -13,8 +13,14 @@
 // limitations under the License.
 
 import {assertTrue} from '../base/logging';
-import {Span, tpDurationToSeconds} from '../common/time';
-import {TPDuration, TPTime, TPTimeSpan} from '../common/time';
+import {
+  Span,
+  timestampOffset,
+  TPDuration,
+  tpDurationToSeconds,
+  TPTime,
+  TPTimeSpan,
+} from '../common/time';
 
 import {TRACK_BORDER_COLOR, TRACK_SHELL_WIDTH} from './css_constants';
 import {globals} from './globals';
@@ -219,8 +225,8 @@
   if (width > TRACK_SHELL_WIDTH && span.duration > 0n) {
     const maxMajorTicks = getMaxMajorTicks(width - TRACK_SHELL_WIDTH);
     const map = timeScaleForVisibleWindow(TRACK_SHELL_WIDTH, width);
-    for (const {type, time} of new TickGenerator(
-             span, maxMajorTicks, globals.state.traceTime.start)) {
+    const offset = timestampOffset();
+    for (const {type, time} of new TickGenerator(span, maxMajorTicks, offset)) {
       const px = Math.floor(map.tpTimeToPx(time));
       if (type === TickType.MAJOR) {
         ctx.beginPath();