MiraiForum

    • Register
    • Login
    • Search
    • Popular
    • Recent
    • Unsolved
    • Tags
    • Groups
    • 友情链接

    无法正常获取群员最后发言时间

    BUG反馈
    2
    6
    29
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      MuLeiSY2021 last edited by

      如图我尝试获取群友发言时间以改善我的娶群友插件
      f78f6a51bbee28d904ecac7569b9e92d.png
      但是当我进行测试,发现无法获取到正确的时间(几乎所有人的发言时间都大于19400天)
      c61770d38ce6928d5419f15829ae1e55.png
      不管是活跃的人还是不活跃的人

      1 Reply Last reply Reply Quote 0
      • M
        MuLeiSY2021 last edited by

        这里的对象是NormalMember

        1 Reply Last reply Reply Quote 0
        • M
          MuLeiSY2021 last edited by

          进一步的测试发现发言时间比入群时间还大
          e23eb3adc4f790e261dbcc1e053ba48b.png

          1 Reply Last reply Reply Quote 0
          • M
            MuLeiSY2021 last edited by

            原因找到了,用系统时间-lastSpeak就行了

            1 Reply Last reply Reply Quote 0
            • cssxsh
              cssxsh last edited by

              timestamp

              那是时间戳

              1 Reply Last reply Reply Quote 0
              • cssxsh
                cssxsh last edited by

                你可以通过时间戳拿到日期时间

                OffsetDateTime time = OffsetDateTime.ofInstant(Instant.ofEpochSecond(1677972575), ZoneId.systemDefault());
                
                1 Reply Last reply Reply Quote 0
                • 1 / 1
                • First post
                  Last post
                Powered by Mamoe Technologies & NodeBB | 友情链接 | 服务监控 | Contact