Skip to content

查询时间戳显示问题 #10

Open
@GeGeLv

Description

@GeGeLv

`use Yurun\TDEngine;
$taosClient = new TDEngine\Client(new TDEngine\ClientConfig([
'host' => '127.0.0.1',
'hostName' => '',
'port' => 6041,
'user' => 'root',
'password' => 'taosdata',
'db' => 'weather',
'ssl' => false,
'timestampFormat' => TDEngine\Constants\TimeStampFormat::LOCAL_STRING, // 此配置 TDengine 3.0 下失效,统一返回格式为:2022-11-25T05:41:04.690Z
'keepAlive' => true,
'version' => '3', // TDengine 版本
'timezone' => 'UTC', // TDengine >= 3.0 时支持,可选参数,指定返回时间的时区
]));

$result = $taosClient->sql(sprintf('select * from weather.station');
`
查询出来的时间为"ts": "2023-12-02T15:26:34.000Z",用convert报错,该怎么调整代码能够显示2023-12-02 23:26:34.000

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions