Is there an easy way to convert date and time, for example:
Sun, 14 Mar 2010 09:00:00 GMT
In this format:
20100306T153626
in php
Use strtotimeand datefunctions.
strtotime
date
$result = date('Ymd\THis', strtotime('Sun, 14 Mar 2010 09:00:00 GMT'));
A βTβ must be escaped because it has a special meaning (short for time zone).
You need a date function . Format string for 20100306T153626:
YmdTHis
i.e.
date("Ymd\THis");
for current date / time. If you want to use your time, you will need this as a Unix timestamp in which you can use the mktime function to do this.
Source: https://habr.com/ru/post/1736197/More articles:The whole monorail call challenge in tests - unit-testingHow to initialize Flash ActionScript 3 (AS3) components? - flashsplitting JSS from CSS to plone.htmlhead - pythonto install the PARADOX extension for PHP - phpWCF UriTemplate will not match a single string parameter with slashes (/ s) - .netSSRS export to Excel has invalid group footers - excelANTLR MismatchedTokenException on a Simple Grammar - antlrCan I get a link to an instance of the SingleHost ServiceHost WCF before the first WCF client request appears? - .netGetting a session inside ASP.Net ScriptMethod - c #boost :: asio tcp async_read never returns - boostAll Articles