Step 1: Verify the attribute exists for asset/object
By default not all object types will come with a time zone attribute to set. This will prevent it being set from asset manager. If you don't see the Time Zone attribute listed under properties below as an option, you will need to insert the attributes.
The time zone attribute, as well as other domain attributes can be viewed in the properties of the edit asset page of Asset Manager
INSERT INTO Bazefield.DomainObjectAttribute (ObjectId,AttributeId,Value) SELECT do.ObjectId,da.AttributeId,'America/New_York' FROM Bazefield.DomainObject do join bazefield.DomainAttribute da on da.TypeId = do.TypeId inner join bazefield.DomainObjectAttribute doa on doa.ObjectId = do.ObjectId WHERE da.[Name] like 'Time Zone' and do.[Key] like 'FGWD%' and do.ObjectId not in (select objectid from bazefield.domainobjectattribute where attributeid in (select attributeid from bazefield.DomainAttribute where [Name] like 'Time Zone')) GROUP BY do.ObjectId,da.attributeid
Step 3: Ensure than you run Update Domain Points from Tags
The "FreeComment" column on the TAG table in sql holds the reference to the domain objects. You can check if this is lost by running a script similar to the following.
SELECT * FROM TAG WHERE FreeComment is NULL or FreeComment = ''
You can update the domain points from tags by going to the asset model and selecting the Update point list from tags button under the domain points tab as shown below.
Step 4: Restart Aggregation Service
This reloads the configurations for the aggregation tags
Step 5:Re-aggregate the tag and verify the result
You can trigger a re-aggregation by re-calculating the source/reference tag. Alternatively, you can follow the script below to force re-aggregations.
insert into tag_aggregate_pending(tagid,numericref) select tagid,numericref from tagvalue_history where numericref > imatis.fn_pims_getgdateUtc('2019-11-25') and numericref < imatis.fn_pims_getgdateUtc('2019-12-04') and TAGID IN (select tagid from tag where tagname like 'SITE-ASSET-TOT-ProducedEnergy.1h%')
Step 6: Troubleshooting
The aggregation service log on verbose prints out the time zones and object ids that it finds. The actual timestamps for start and end entered into the log don't reference this timezone change, but the timestamp saved to the aggregated data tag will be appropriate.
The new domain objects hold attributes for time zones that ensure aggregations are calculated for the correct site timezone.