Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一堆日期,我想找到它们的平均值。
System.out.println(Long.MAX_VALUE / System.currentTimeMillis());
输出:
6892653
我认为这回答了你的两个问题。您还可以将每个 epoch 值除以 1000*60*60*24,但考虑到该原始商的大小,即使这样也可能是矫枉过正。