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.
我使用 hunchentoot 网络服务器,并在那里上传文件。它将文件存储到临时位置(/tmp/hunchentoot/hunchentoot-XX),并将修改和创建日期设置为now。如何获得收到的文件的原始创建日期?
1) 日期根本不通过 HTTP 发送,它不依赖于您的服务器。2) 您不能期望总是从客户那里获得正确的日期信息。
如果文件格式包含日期,则解析格式。如果您确定格式不会被恶意用户篡改,请执行此操作。
如果您信任用户,让他手动选择日期。