V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
markliu2013
V2EX  ›  OpenAI

Chat GTP 获取当前时间戳是错的吗?

  •  
  •   markliu2013 · 2022-12-11 20:47:40 +08:00 · 1375 次点击
    这是一个创建于 507 天前的主题,其中的信息可能已经有所发展或是发生改变。

    https://chatgpt.snsxiong.com/d/n3XPGH3

    它说 System.currentTimeMillis()与时区有关?

    2 条回复    2022-12-12 09:07:36 +08:00
    Citrus
        1
    Citrus  
       2022-12-11 21:53:05 +08:00
    不知道从哪学来的,搜了下主流的问答对这个问题的回答都是对的啊,有点奇怪。
    xuyang2
        2
    xuyang2  
       2022-12-12 09:07:36 +08:00
    https://docs.oracle.com/javase/7/docs/api/java/lang/System.html#currentTimeMillis()

    Returns:
    the difference, measured in milliseconds, between the current time and midnight, January 1, 1970 UTC.

    `midnight, January 1, 1970 UTC` 是个固定的时间点,跟时区无关吧
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2205 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 11:14 · PVG 19:14 · LAX 04:14 · JFK 07:14
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.