Function美国中心时区

Function美国中心时区

本文介绍了Google Cloud Function美国中心时区?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道什么时区云功能代码将像EST,CST,MST,PST这样运行.我部署了函数来获取它,但它返回了2018-12-05T17:54:00.207Z且未应用任何美国时区.它不在美国运行吗?

I'd like to know what timezone cloud function code would run like EST, CST, MST, PST something like this.I deployed function to get it but it returned 2018-12-05T17:54:00.207Z and not applying any US timezone. Is it not running in US?

 export const dateLog = functions.https.onRequest((_, response) => {
    const date = new Date();
    console.log(date);
    response.send(date);
});

推荐答案

我认为这是UTC.我尝试了print(datetime.now())并获得了UTC时间戳.

I think it's UTC. I tried print(datetime.now()) and got a UTC timestamp.

这篇关于Google Cloud Function美国中心时区?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-07 08:56