Data storage chart visualization shows incorrect timestamps after timezone migration

Charts generated from stored telemetry data display timestamps that are 5 hours off after we migrated our Azure IoT Central deployment from US East to EU West regions. Historical data analysis is now completely unreliable because the timezone conversion isn’t being applied correctly to stored data.

The issue affects chart configuration for all time-series visualizations. When we query data through the SDK, timestamps look correct:

const data = await client.queryTelemetry({
  startTime: '2025-04-20T00:00:00Z',
  endTime: '2025-04-21T00:00:00Z'
});
console.log(data[0].timestamp); // Shows UTC correctly

But when the same data renders in charts, it’s offset by our old region’s timezone. User localization settings are configured to UTC, yet the charts ignore this. Has anyone dealt with timezone conversion issues in visualization after regional migration?

This is a known issue with Azure IoT Central’s chart renderer. The visualization layer caches timezone metadata from when data was originally stored. After migration, you need to force a refresh of the chart configuration metadata. Go to your dashboard settings and click ‘Reset Visualization Cache’ under Advanced Options. This rebuilds the timezone mapping for all charts.

The inconsistency between chart types suggests your historical data has mixed timezone markers. Data written before migration has US East timezone metadata, data after has EU West. The chart renderers handle this differently - line charts apply conversion per data point, but bar charts aggregate first then convert, causing the offset. You might need to run a data migration script to normalize all historical timestamps to UTC.

The SDK returns UTC correctly because it’s reading directly from storage. But the chart widget has its own timezone conversion layer that’s separate from the SDK. Check your chart widget properties - there’s usually a timezone parameter that defaults to the region where the dashboard was created. You need to explicitly set it to UTC or your target timezone. Also verify that your browser locale isn’t interfering with the display.

You’ve hit a complex timezone conversion issue that requires addressing multiple layers. Here’s the complete solution:

Timezone Conversion: Your stored data has embedded timezone metadata from the original region. Query your telemetry storage and check the _ts and timezone fields. Run this migration script to normalize:

const records = await storage.query({ dateRange: 'all' });
records.forEach(r => {
  r.timestamp = moment(r.timestamp).utc().toISOString();
  r.timezone = 'UTC';
});
await storage.bulkUpdate(records);

Chart Configuration: Set explicit timezone in each chart widget’s JSON config: "timezone": "UTC", "useLocalTime": false. The ‘Auto’ setting is unreliable post-migration.

Historical Data Analysis: For mixed timezone data, implement a normalization layer. Create a custom query function that converts all timestamps to UTC before rendering. Add to your dashboard initialization:

chartConfig.dataTransform = (data) => {
  return data.map(d => ({
    ...d,
    timestamp: moment.tz(d.timestamp, 'UTC').format()
  }));
};

User Localization: Clear browser localStorage and session cookies - these can cache old timezone preferences. Update user profile settings in Azure IoT Central to explicitly set timezone to UTC, then propagate to all visualization components.

Upgrade to Azure IoT SDK v4.2+ which includes automatic timezone normalization for chart data. The key is ensuring consistency across storage, query layer, and visualization - all must use UTC. After implementing these changes, verify with data from both pre and post-migration periods to confirm alignment.