最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

Oracle下時(shí)間轉(zhuǎn)換在幾種語(yǔ)言中的實(shí)現(xiàn)

 更新時(shí)間:2007年04月02日 00:00:00   作者:  
c shell perl php下的日期時(shí)間轉(zhuǎn)換: 秒數(shù)與人類(lèi)可讀日期 scalar localtime 與 seconds since `00:00:00 1970-01-01 UTC'
scalar localtime 26-byte string 與 seconds since `00:00:00 1970-01-01 UTC'
(1970年1月1日凌晨零點(diǎn)以來(lái)的秒數(shù))
the number of seconds that have passed since the Epoch: 00:00:00 January 1, 1970, Coordinated Universal Time (UTC). 

c:
《Advanced Programming in the UNIX Environment: Second Edition》
簡(jiǎn)稱《APUE》 Seciont 6.10 Figure 6.8. Relationship of the various time functions 說(shuō)的清楚
#include <time.h>
time_t time(time_t *calptr);
struct tm *localtime(const time_t *calptr);
struct tm *gmtime(const time_t *calptr);
time_t mktime(struct tm *tmptr);
char *asctime(const struct tm *tmptr);
char *ctime(const time_t *calptr);
size_t strftime(char *restrict buf, size_t maxsize,
                const char *restrict format,
                const struct tm *restrict tmptr);

shell:
% date +%s
1128621784

% date -d "1970-01-01 UTC 1128621784 seconds"
Fri Oct  7 02:03:04 CST 2005

date -d "1970-01-01 UTC 1128621784 seconds" +"%Y-%m-%d %H:%M:%S"
2005-10-07 02:03:04

perl:
%  perl -e 'print scalar localtime 1128621784'
Fri Oct  7 02:03:04 2005

php:
date('Y-m-d H:i:s',time()); 

相關(guān)文章

最新評(píng)論

祁东县| 伊通| 凤山县| 阳山县| 广西| 舒城县| 海淀区| 普陀区| 明光市| 绥德县| 南京市| 张家界市| 贡觉县| 环江| 东方市| 昭觉县| 扶风县| 徐闻县| 铜鼓县| 右玉县| 迁西县| 永善县| 错那县| 新余市| 四平市| 丰原市| 岳阳县| 达尔| 临泽县| 江油市| 彭山县| 泰州市| 延边| 清涧县| 阿巴嘎旗| 西充县| 锡林郭勒盟| 兖州市| 澜沧| 平湖市| 景德镇市|