Issue
After configuring External Log Storage with an MS SQL or PostgreSQL database, event and alarm timestamps viewed directly in the database do not match the timestamps displayed in EcoStruxure Building Operation. The timestamps in the External Log Storage database appear offset by several hours compared to what is seen in WorkStation or WebStation.
Product Line
EcoStruxure Building Operation
Environment
- External Log Storage
- MS SQL Server database
- PostgreSQL/Timescale database
- Building Operation WorkStation and WebStation
Cause
All historical and event data in EcoStruxure Building Operation is stored in UTC. EBO clients automatically convert timestamps to the local time zone when displaying data. When querying the External Log Storage database directly, the raw UTC values are returned and no time-zone conversion is applied, resulting in an apparent timestamp offset.
Resolution
Apply the appropriate UTC-to-local time conversion within the SQL query or reporting layer when retrieving data from the External Log Storage database.
Examples:
Note: Use your system’s applicable Windows time zone name
Example 1: Using modern SQL Server (AT TIME ZONE):
SELECT AlarmId, EventText, TimestampUTC,
TimestampUTC AT TIME ZONE 'UTC' AT TIME ZONE 'West Asia Standard Time' AS LocalTimestamp
FROM dbo.AlarmEvent;
Example 2: Using basic offset calculation:
SELECT AlarmId, EventText,
DATEADD(HOUR, 5, TimestampUTC) AS LocalTimestamp
FROM dbo.AlarmEvent;
Alternatively, calculate the system UTC offset dynamically and apply it in the query.
Note:
- External Log Storage is intended for data storage only and is not a reporting solution.
- SQL-based reporting, transformations, and time-zone handling are the responsibility of the customer or integrator.
- For supported reporting within EcoStruxure Building Operation, use Notification Reports to generate scheduled or on-demand exports without requiring direct SQL queries.