Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/278.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/postgresql/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 获取sql格式的服务器时间戳_Php_Postgresql - Fatal编程技术网

Php 获取sql格式的服务器时间戳

Php 获取sql格式的服务器时间戳,php,postgresql,Php,Postgresql,如何以存储在postgresql数据库中的相同格式获取服务器时间戳?我试图计算服务器时间与存储在数据库中某一行上的时间之间的时差?当前时间戳给出事务的开始时间。时间是服务器的时间 SELECT my_time, current_timestamp FROM my_table;

如何以存储在postgresql数据库中的相同格式获取服务器时间戳?我试图计算服务器时间与存储在数据库中某一行上的时间之间的时差?

当前时间戳
给出事务的开始时间。时间是服务器的时间

SELECT my_time, current_timestamp
FROM my_table;