Handling time zone in web application

后端 未结 6 907
梦毁少年i
梦毁少年i 2020-12-24 03:45

In our web application we need to show and enter date time information for different countries in different time zone. Right now, we are maintaining separate web server and

6条回答
  •  佛祖请我去吃肉
    2020-12-24 04:37

    Use TIMESTAMP WITH LOCAL TIME ZONE
    if you want the database to automatically convert a time between the database and session time zones.

    Stores a date and time with up to 9 decimal places of precision. This datatype is sensitive to time zone differences. Values of this type are automatically converted between the database time zone and the local (session) time zone. When values are stored in the database, they are converted to the database time zone, but the local (session) time zone is not stored. When a value is retrieved from the database, that value is converted from the database time zone to the local (session) time zone.

提交回复
热议问题