`

PHP Date / Time Functions References

    博客分类:
  • PHP
阅读更多

Installation

The date/time functions are part of the PHP core. There is no installation needed to use these functions.


Runtime Configuration

The behavior of the date/time functions is affected by settings in php.ini.

Date/Time configuration options:

NameDefaultDescriptionChangeable
date.default_latitude "31.7667"Specifies the default latitude (available since PHP 5). This option is used by date_sunrise() and date_sunset()PHP_INI_ALL
date.default_longitude"35.2333"Specifies the default longitude (available since PHP 5). This option is used by date_sunrise() and date_sunset()PHP_INI_ALL
date.sunrise_zenith"90.83"Specifies the default sunrise zenith (available since PHP 5). This option is used by date_sunrise() and date_sunset()PHP_INI_ALL
date.sunset_zenith"90.83"Specifies the default sunset zenith (available since PHP 5). This option is used by date_sunrise() and date_sunset()PHP_INI_ALL
date.timezone""Specifies the default timezone (available since PHP 5.1)PHP_INI_ALL


PHP Date / Time Functions

PHP: indicates the earliest version of PHP that supports the function.

FunctionDescriptionPHP
checkdate()Validates a Gregorian date3
date_default_timezone_get()Returns the default time zone5
date_default_timezone_set()Sets the default time zone5
date_sunrise()Returns the time of sunrise for a given day / location5
date_sunset()Returns the time of sunset for a given day / location5
date()Formats a local time/date3
getdate()Returns an array that contains date and time information for a Unix timestamp3
gettimeofday()Returns an array that contains current time information3
gmdate()Formats a GMT/UTC date/time3
gmmktime()Returns the Unix timestamp for a GMT date3
gmstrftime()Formats a GMT/UTC time/date according to locale settings3
idate()Formats a local time/date as integer5
localtime()Returns an array that contains the time components of a Unix timestamp4
microtime()Returns the microseconds for the current time3
mktime()Returns the Unix timestamp for a date3
strftime()Formats a local time/date according to locale settings3
strptime()Parses a time/date generated with strftime()5
strtotime()Parses an English textual date or time into a Unix timestamp3
time()Returns the current time as a Unix timestamp3


PHP Date / Time Constants

PHP: indicates the earliest version of PHP that supports the constant.

ConstantDescriptionPHP
DATE_ATOMAtom (example: 2005-08-15T16:13:03+0000) 
DATE_COOKIEHTTP Cookies (example: Sun, 14 Aug 2005 16:13:03 UTC) 
DATE_ISO8601ISO-8601 (example: 2005-08-14T16:13:03+0000) 
DATE_RFC822RFC 822 (example: Sun, 14 Aug 2005 16:13:03 UTC) 
DATE_RFC850RFC 850 (example: Sunday, 14-Aug-05 16:13:03 UTC) 
DATE_RFC1036RFC 1036 (example: Sunday, 14-Aug-05 16:13:03 UTC) 
DATE_RFC1123RFC 1123 (example: Sun, 14 Aug 2005 16:13:03 UTC) 
DATE_RFC2822RFC 2822 (Sun, 14 Aug 2005 16:13:03 +0000) 
DATE_RSSRSS (Sun, 14 Aug 2005 16:13:03 UTC) 
DATE_W3CWorld Wide Web Consortium (example: 2005-08-14T16:13:03+0000) 


分享到:
评论

相关推荐

    references.zip

    references/detection/engine.py , references/detection/utils.py 和 references/ detection/transforms.py

    FUZZY CONTROL SYSTEMS DESIGN AND ANALYSIS

    References/81 4 FUZZY OBSERVER DESIGN 83 4.1 Fuzzy Observer/83 4.2 Design of Augmented Systems/84 4.2.1 Case A/85 4.2.2 Case B/90 4.3 Design Example/93 References/96 5 ROBUST FUZZY CONTROL 97 5.1 ...

    COVID_references

    -read.csv(file="https://raw.githubusercontent.com/ZikaProject/COVID_references/master/current_part1.csv", stringsAsFactors=FALSE) references2<-read.csv(file=...

    typescript-ref-tools:用于TypeScript参考的实用工具

    node index.js --action generate --dir ' app/src ' --ref ' app/types/references.ts ' --sort App,Log 将按特定顺序生成引用列表。 node index.js --action update --dir ' app/src ' --ref ' app/types/...

    Android代码-FiftyShadesOf

    FiftyShadesOf An elegant context-care ... .on(view1, view2, view3) //views references .on(viewGroup) //group of views .except(view1, view2) //skip a view .start(); Cross (By Default) Fifty

    References.rar

    References.rar

    Majorization and Matrix-Monotone Functions in Wireless Communications

    Contents 1 Introduction 1 1.1 Majorization Theory 1 1.2 Matrix-Monotone Functions 3 1.3 Classification and Organization 4 1.4 Notation 7 2 Majorization Theory 9 2.1 Definition and Examples ...References

    hibernate4.3.5references chm文档

    hibernate4.3.5references chm文档

    mask-rcnn实现房屋漏水语义分割

    * https://github.com/pytorch/vision/tree/master/references/detection ## 环境配置: * Python3.6/3.7/3.8 * Pytorch1.10或以上 * pycocotools(Linux:`pip install pycocotools`; Windows:`pip install ...

    world wind 微软地球插件。

    NAME: virtual earth .good // VERSION: 1.0 // DESCRIPTION: 地图由微软公司提供 at http://local.live.com/ // DEVELOPER: casey chesnut // WEBSITE: http://www.brains-N-brawn.com/veWorldWind/ // REFERENCES:

    php英文开发文档

    •Date and Time Related Extensions •File System Related Extensions •Human Language and Character Encoding Support •Image Processing and Generation •Mail Related Extensions •Mathematical ...

    Advanced Algorithmic Trading

    Pub Date: 2017 ISBN: n/a Pages: 517 Language: English Machine Learning Applied To Real World Quant Strategies Finally…implement advanced trading strategies using time series analysis, machine ...

    VCSEL中极化噪声的建模与分析:该文件包含研究论文“ VCSEL中极化噪声的建模与分析”的Matlab实现。-matlab开发

    请找到出版物: https://rdcu.be/532w https://www.researchgate.net/publication/327510546_Modelling_and_analysis_of_polarization_noise_in_vertical_cavity_surface_mission_LASERs 引文: ...

    Asset Cleaner PRO - Clean - Find References

    Feature 1 - Project Cleaner: 1、Actions for unused files 2、Enhanced Project View Feature 2 - Find References: 1、Find references, usages, relationships easily in ...2、Explore usages & references

    Printed Circuits Handbook

    References / 2.21 Chapter 3. Semiconductor Packaging Technology 3.1 3.1 Introduction / 3.1 3.2 Single-Chip Packaging / 3.5 3.3 Multichip Packages / 3.15 3.4 Optical Interconnects / 3.18 3.5 High-...

    Laravel开发-static-references-laravel

    Laravel开发-static-references-laravel Laravel应用程序的静态引用

    F# wikibook

    F# wikibook Contents Articles F Sharp Programming 1 F Sharp Programming/ Preface 4 ...References Article Sources and Contributors 252 Image Sources, Licenses and Contributors 253 Article Licenses

    PHP从FLV文件获取视频预览图的方法

    // references http://www.longtailvideo.com/support/forum/Modules/12661/External-PHP-with-FFmpeg-using-readfile- // generate a preview image from an FLV file on-the-fly, or to save // call with: ffmpeg...

    Process-Portfolio:DGL 104Craft.io组合

    DGL104Craft.io产品组合 瑞安·龙-N0180886 ...// Canvas references const canvas = document . querySelector ( "canvas" ) ; const ctx = canvas . getContext ( "2d" ) ; // UI references con

    vision-references.zip

    torch.vision.references.detection包,集成了train_one_epoch、evaluate等重要函数

Global site tag (gtag.js) - Google Analytics