加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

Oracle下时间转换在几种语言中的实现

发布时间:2020-12-12 16:49:09 所属栏目:百科 来源:网络整理
导读:cshellperlphp下的日期时间转换:秒数与人类可读日期scalarlocaltime与secondssince 00:00:001970-01-01UTC' BRscalarlocaltime26-bytestring与secondssince 00:00:001970-01-01UTC' (1970年1月1日凌晨零点以来的秒数) thenumberofsecondsthathavepassedsin

cshellperlphp下的日期时间转换:秒数与人类可读日期scalarlocaltime与secondssince00:00:001970-01-01UTC' <BR>scalarlocaltime26-bytestring与secondssince00:00:001970-01-01UTC'
(1970年1月1日凌晨零点以来的秒数)
thenumberofsecondsthathavepassedsincetheEpoch:00:00:00January1,1970,CoordinatedUniversalTime(UTC). c:
《AdvancedProgrammingintheUNIXEnvironment:SecondEdition》
简称《APUE》Seciont6.10Figure6.8.Relationshipofthevarioustimefunctions说的清楚
#include<time.h>
time_ttime(time_tcalptr);
structtm
localtime(consttime_tcalptr);
structtm
gmtime(consttime_tcalptr);
time_tmktime(structtm
tmptr);
charasctime(conststructtmtmptr);
charctime(consttime_tcalptr);
size_tstrftime(charrestrictbuf,size_tmaxsize,
constchar
restrictformat,
conststructtm*restricttmptr); shell:
%date+%s
1128621784 %date-d"1970-01-01UTC1128621784seconds"
FriOct702:03:04CST2005 date-d"1970-01-01UTC1128621784seconds"+"%Y-%m-%d%H:%M:%S"
2005-10-0702:03:04 perl:
%perl-e'printscalarlocaltime1128621784'
FriOct702:03:042005 php:
date('Y-m-dH:i:s',time());

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读