frankx: "Do 03 Nov 2005 08:22:13 CET" umwandeln

Beitrag lesen

Hellihello

Hello,

stehich grad auf dem Schlauch: mit welcher Funktion bekomme ich "Do 03 Nov 2005 08:22:13 CET" als timestamp?

http://de3.php.net/manual/de/function.strtotime.php könnte evtl. helfen?

Jau, aber die verweisen auf die GNU-datums-Syntax:

The output of the date command is not always acceptable as a date string, not only because of the language problem, but also because there is no standard meaning for time zone items like ‘IST’. When using date to generate a date string intended to be parsed later, specify a date format that is independent of language and that does not use time zone items other than ‘UTC’ and ‘Z’. Here are some ways to do this:

$ LC_ALL=C TZ=UTC0 date
Mon Mar  1 00:21:42 UTC 2004
$ TZ=UTC0 date +'%Y-%m-%d %H:%M:%SZ'
2004-03-01 00:21:42Z
$ date --iso-8601=ns | tr T ' '  # --iso-8601 is a GNU extension.
2004-02-29 16:21:42,692722128-0800
$ date --rfc-2822  # a GNU extension
Sun, 29 Feb 2004 16:21:42 -0800
$ date +'%Y-%m-%d %H:%M:%S %z'  # %z is a GNU extension.
2004-02-29 16:21:42 -0800
$ date +'@%s.%N'  # %s and %N are GNU extensions.
@1078100502.692722128

und

  
<?php  
var_dump(strtotime("Do 03 Nov 2005 08:22:13 CET"));  
?>  

schenkt mir ein int(-1);

Dank und Gruß,

frankx

--
tryin to multitain  - Globus = Planet != Welt