Re: Is there a way to change current time? - Mailing list pgsql-performance

From Tom Lane
Subject Re: Is there a way to change current time?
Date
Msg-id 3778411.1618496013@sss.pgh.pa.us
Whole thread Raw
In response to Re: Is there a way to change current time?  (Bruce Momjian <bruce@momjian.us>)
List pgsql-performance
Bruce Momjian <bruce@momjian.us> writes:
> On Thu, Apr 15, 2021 at 04:45:44PM +0300, Warstone@list.ru wrote:
>> Is there any way to set time that CURRENT_TIMESTAMP and/or now() will give next
>> time? (We need it only for testing purposes so if there is any hack, cheat,
>> etc. It will be fine)

> No, it gets the time from the operating system.

I think there are OS-level solutions for this on some operating systems.
If nothing else, you could manually set the system clock; but what you'd
really want is for the phony time to be visible to just some processes.

            regards, tom lane



pgsql-performance by date:

Previous
From: Justin Pryzby
Date:
Subject: Re: Is there a way to change current time?
Next
From: Pavel Stehule
Date:
Subject: Re: Is there a way to change current time?