Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have a task copying data. I have a couple of rules where I add columns. 2 of those columns are:
- COMMIT_TIMESTAMP - it comes from header $AR_H_COMMIT_TIMESTAMP.
- REPLICATE_TIMESTAMP - it comes from expression datetime('now')
Its my understanding that both, in terms of time zone, would reflect the Qlik Replicate server time zone but curious enough I always see the REPLICATE_TIMESTAMP "happening" before the COMMIT_TIMESTAMP.
How is this possible? Am I missing something with the time zones?
Hello @FabioTavares ,
AR_H_COMMIT_TIMESTAMP is stored in the database local time.
If you convert REPLICATE_TIMESTAMP to local time as well, the comparison becomes much easier.
thanks,
John.
Hi @FabioTavares ,
You don’t need to know the server’s time zone; simply specifying the UTC parameter is sufficient, as shown below
datetime($AR_H_COMMIT_TIMESTAMP, 'UTC')
Regards,
Desmond
Hello @FabioTavares ,
There are two possible reasons:
datetime('now') returns the UTC time.
If you need the local time, you can use:
datetime('now','localtime').
Please verify the system time and time zone settings on both the source database server and the Replicate server, and ensure they are properly synchronized.
Hope this helps.
John.
Hello @john_wang,
Thank you for the quick assist. I think I got confused... indeed datetime('now') is utc.
I will check the Qlik server time zone but out of curiosity, is there a way to bring the value of header 'AR_H_COMMIT_TIMESTAMP' in UTC without knowing the server time zone?
Hello @FabioTavares ,
AR_H_COMMIT_TIMESTAMP is stored in the database local time.
If you convert REPLICATE_TIMESTAMP to local time as well, the comparison becomes much easier.
thanks,
John.
Hi @FabioTavares ,
You don’t need to know the server’s time zone; simply specifying the UTC parameter is sufficient, as shown below
datetime($AR_H_COMMIT_TIMESTAMP, 'UTC')
Regards,
Desmond
Hello @DesmondWOO,
I just did the transformations and forced a reload (with truncate), but I still see the replicate before the commit. What am I missing?
Hello @DesmondWOO, @john_wang,
Apologies for insisting, but can you check my previous post? Seems the 'UTC' mark is not working and not sure I'm doing something wrong.
Hello @FabioTavares ,
Could you please share the source and target database types, as well as the time zones of the following three machines:
Source database server
Qlik Replicate server
Target database server
In the meantime, you can add the following three expressions to the table and compare their values to better understand how the timestamps are being interpreted:
datetime($AR_H_COMMIT_TIMESTAMP)
→ Source database server local time
datetime($AR_H_COMMIT_TIMESTAMP, 'localtime')
→ Source database server local time adjusted by your local time zone
datetime($AR_H_COMMIT_TIMESTAMP, 'UTC')
→ Source database server local time converted to UTC
For reference, you can also check:
datetime('now', 'UTC')
→ Current UTC time
Comparing these values should help clarify the time zone logic in effect.
Hope this helps.
John.
Hi @john_wang,
| Source Database | Qlik Server | Target Database | |
| Machine\Version | SQL Server Microsoft SQL Server 2019 (RTM-CU32-GDR) (KB5063757) - 15.0.4440.1 (X64) Jul 14 2025 12:59:40 Copyright (C) 2019 Microsoft Corporation Enterprise Edition: Core-based Licensing (64-bit) on Windows Server 2019 Standard 10.0 <X64> (Build 17763: ) (Hypervisor) |
Unknown | Azure Fabric SQL Microsoft SQL Azure (RTM) - 12.0.2000.8
Jan 2 2026 13:26:31
Copyright (C) 2025 Microsoft Corporation
|
| Timezone | (UTC+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna | Can I check via Qlik? I do not have access to the machine itself. | (UTC) Coordinated Universal Time |
I just did a copy of a table and here is the result
Config
Result on target
I also have this log
00006992: 2026-01-29T12:30:12 [TASK_MANAGER ]I: Start loading table 'dbo'.'wf_tran_header' (Id = 1) by subtask 1. Start load timestamp 000649852DF876C0 (replicationtask_util.c:760)