`

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

    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

    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 引文: ...

    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-...

    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

    vision-references.zip

    《torch.vision.references.detection深度解析》 在Python的机器学习领域,PyTorch是一个备受推崇的框架,它以其灵活性和高效性深受开发者喜爱。在PyTorch的生态系统中,torch.vision模块提供了图像处理和计算机...

    Python库 | wagtail_references-0.0.2.tar.gz

    《Python库 wagtail_references-0.0.2详解》 在Python编程领域,库的使用是提高开发效率和代码质量的重要手段。今天我们要探讨的是一个名为`wagtail_references`的Python库,版本号为0.0.2,它封装了一些特定的功能...

    References.rar

    4. **通过随机递归神经网络实现多变量时间序列的鲁棒异常检测** (7)Robust anomaly detection for multivariate time series through stochastic recurrent neural network.pdf 论文提出了一个基于随机递归神经网络...

    Python库 | pelican_references-0.2.3-py3-none-any.whl

    Python库pelican_references是一个用于处理和管理参考文献的工具,主要面向使用Pelican生成静态博客或网站的开发者。Pelican是Python编写的一款流行的静态站点生成器,它允许用户使用Markdown或reStructuredText格式...

    Opencv References

    这份“Opencv References”压缩包包含了18个详尽的PDF文档,涵盖了OpenCV库的多个关键模块,旨在为开发者提供全面的参考和指导。 1. **Cv和CvCAM模块**: 这些是OpenCV早期版本中的核心模块,Cv主要处理图像和基本的...

    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

Global site tag (gtag.js) - Google Analytics