Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Named a 7-Time Gartner® Magic Quadrant™ Leader: See the 2026 Report
cancel
Showing results for 
Search instead for 
Did you mean: 
FabioTavares
Contributor II
Contributor II

Qlik Replicate - Commit vs now (replicate) timestamps

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?

Labels (2)
2 Solutions

Accepted Solutions
john_wang
Support
Support

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.

Help users find answers! Do not forget to mark a solution that worked for you! If already marked, give it a thumbs up!

View solution in original post

DesmondWOO
Support
Support

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

 

Help users find answers! Do not forget to mark a solution that worked for you! If already marked, give it a thumbs up!

View solution in original post

8 Replies
john_wang
Support
Support

Hello @FabioTavares ,

There are two possible reasons:

  1. datetime('now') returns the UTC time.
    If you need the local time, you can use:
    datetime('now','localtime').

  2. 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.

 

Help users find answers! Do not forget to mark a solution that worked for you! If already marked, give it a thumbs up!
FabioTavares
Contributor II
Contributor II
Author

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?

john_wang
Support
Support

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.

Help users find answers! Do not forget to mark a solution that worked for you! If already marked, give it a thumbs up!
DesmondWOO
Support
Support

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

 

Help users find answers! Do not forget to mark a solution that worked for you! If already marked, give it a thumbs up!
FabioTavares
Contributor II
Contributor II
Author

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?

FabioTavares_0-1769079458538.pngFabioTavares_1-1769079508107.png

 



FabioTavares
Contributor II
Contributor II
Author

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.

john_wang
Support
Support

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.

Help users find answers! Do not forget to mark a solution that worked for you! If already marked, give it a thumbs up!
FabioTavares
Contributor II
Contributor II
Author

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

FabioTavares_0-1769693560104.png

Result on target

FabioTavares_1-1769694322467.png

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)