位置: 编程技术 - 正文
1. 一般使用:
@nowtime=localtime();#($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime();注意:$mon+1,$year+;$now_string = localtime; # e.g., "Thu Oct :: "
2.如果要把时间保存在数据库中,可以先将其保存为字符串,然后读出时对字符串再处理。
@nowtime=localtime();$nowstring=join(',',@nowtime);将$nowstring保存;读取:@nowtime=split(',',$nowstring);
更多内容请参考:
推荐整理分享Perl localtime时间函数的应用介绍(perl localtime函数),希望有所帮助,仅作参考,欢迎阅读内容。
文章相关热门搜索词:perl date,perl localtime函数,perl 获取当前时间,perl date,perl 时间转换,perl strftime,perl 时间转换,perl localtime函数,内容如对您有帮助,希望把文章链接给更多的朋友!
让apache2以cgi方式运行perl cgi程序的实现方法 1、linux系统一般自带perl可运行程序在:/usr/bin/perl2、perl测试程序#!/usr/bin/perl-wusewarnings;print"Hello,Perlworks!";命名为test.pl在终端下,定位到该目录,输入perl
perl处理xml的模块介绍 1.查找已有的模块
Perl从文件中读取字符串的两种实现方法 1.一次性将文件中的所有内容读入一个数组中(该方法适合小文件):open(FILE,"filename")||die"cannotopenthefile:$!";@filelist=FILE;foreach$eachline(@filelist){chomp$eachline;}clos
标签: perl localtime函数
本文链接地址:https://www.jiuchutong.com/biancheng/372485.html 转载请保留说明!友情链接: 武汉网站建设