What time is in DEX_ROW_TS? That's not local, is it?

Yes. Specifically, it's GETUTCDATE()

https://docs.microsoft.com/en-us/sql/t-sql/functions/getutcdate-transact-sql?view=sql-server-ver15

The trigger that updates SOP10100 :

ALTER TRIGGER [dbo].[zDT_SOP10100U]
ON [dbo].[SOP10100]
AFTER UPDATE
AS
SET NOCOUNT ON;
BEGIN
    UPDATE dbo.SOP10100
    SET DEX_ROW_TS=GETUTCDATE()
    FROM dbo.SOP10100, inserted
    WHERE SOP10100.SOPTYPE=inserted.SOPTYPE AND SOP10100.SOPNUMBE=inserted.SOPNUMBE;
END;
SET NOCOUNT OFF;

I'm sure that the idea is that you could have users across multiple time zones updating a database and this method allows them to be accurate. 

 


RealWorldCode gives developers practical, real‑world solutions with clean, working code — no fluff, no theory, just answers.
Links
Home
Knowledge Areas
Sitemap
Contact
Et cetera
Privacy Policy
Terms and Conditions
Cookie Preferences