鉴于这个简单的表:
create table comments (
id numeric not null,
comment text,
created timestamp not null default now()
);
从我的电脑直接在数据库上使用 dbeaver,并执行此语句
insert into comments (id, comment)
select 1111, 'test';
新记录的“创建”字段是:2017-02-24 16:17:21
这是我的正确时间(CET)。
当我从 php 脚本(在连接到数据库的基于 linux 的网络服务器上运行)运行相同的语句时,结果是2017-02-24 15:17:21
. linux服务器时间没问题(也就是CET)。
我错过了什么?