获取当前时间并写入文件
题目描述:
设计程序,获取当前系统时间,把时间转换为特定格式”y年mm月dd日 星期xtt:mm:ss”,并每隔 1s 写入到本地磁盘中一个叫做log.txt 的文本中,如果文本不存在则创建。
node -v #查看node版本
npm -v #查看npm版本
npm install -g cnpm –registry=http://registry.npm.taobao.org #安装淘宝的cnpm 管理器
cnpm -v #查看cnpm版本
cnpm install -g hexo-cli #安装hexo框架
hexo -v #查看hexo版本
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.