[英]How does directory list date format change over new year (FTP)
I am parsing a datetime from an FTP listing. 我正在从FTP列表解析日期时间。
I realise that all FTP clients are different, but I'm wondering what generally happens with year changes? 我意识到所有FTP客户端都是不同的,但是我想知道年份更改通常会发生什么?
eg For recent files, the format might be 例如,对于最新文件,格式可能是
Mar 09 01:32
For old files, the format might be 对于旧文件,格式可能是
Mar 04 2002
When does the switchover happen from showing the time to showing the year? 从显示时间到显示年份的切换何时发生? Is it
是吗
I understand there probably isn't a definitive answer - but if there's a "normal" way, then I'd like to know about it. 我知道可能没有明确的答案-但是,如果有一种“正常”的方式,那么我想知道。
Not quite an answer - but the best I've got - is to assume that your average FTP server is going to act like linux. 并不是一个很好的答案-而是我所能拥有的最好的-假设您的普通FTP服务器将像Linux一样工作。
In this case, it seems that the time is replaced by the year in 6 month delay. 在这种情况下,时间似乎被延迟6个月的年份所代替。
eg today - March 22nd 2011 - I've found some files on a linux server like this: 例如今天-2011年3月22日-我在linux服务器上发现了一些文件,如下所示:
drwxr-xr-x 2 user user 4096 Sep 16 2010 blahdir
-rw-r----- 1 user user 0 Sep 27 11:05 blahfile
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.