Another approach is to read the last registration date / time from the user's record upon logging in and save it in the session or in the session cookie. Then update the user record with the current date / time. Then, on your pages, read the value stored in the session / cookie.
The old time will be deleted when the session ends, which usually occurs when the user needs to re-enter the system. It also has the advantage of speed and caching as it reads from a session / cookie.
But it depends on your setup and application, is it possible for you.
UPDATE
, ... / , . , / , cookie. / .
, , cookie cookie .