Getting date/time according to user time for PostgreSQL
Posted: Thu Jul 26, 2007 11:29 pm
Hi,
I'm trying to retrieve and displaying date and time of post according to user timezone.
Such as this forum showing the date and time of post.
I have done this in MySQL before -
Is there a way to do this in PostgreSQL?
Thanks in advance.
I'm trying to retrieve and displaying date and time of post according to user timezone.
Such as this forum showing the date and time of post.
I have done this in MySQL before -
Code: Select all
SELECT CONVERT_TZ(NOW(), sometable.server_time, sometable.user_time) AS user_time_now FROM sometable
Thanks in advance.