点击(此处)折叠或打开
- #!/usr/bin/perl
- # 来源: Lover的工具小屋
- # author: Lover
- use strict;
- use warnings;
- # 使用strftime来得到想要的时间格式,格式和命令date一模一样
- use POSIX qw(strftime);
- print strftime("%Y-%m-%d %H:%M:%S %Z",localtime()); # %Z 时区
2012-03-21 18:44:50 CST
2325阅读 0评论2012-03-21 努力小伙
分类:Python/Ruby
点击(此处)折叠或打开