omglesno.blogg.se

20% of 14
20% of 14







20% of 14

for example, this works: $old_date = date('l, F d y h:i:s') // returns Saturday, January 30 10 02:06:34 strftime() understands any date input short of the next time joe will slip on the ice. You will have to parse the elements (year, month, day, hour, minute, second) manually using substr() and hand the results to mktime() that will build you a timestamp.īut that's a lot of work! I recommend using a different format that strftime() can understand. It allows you to specify an exact mask - using the date() syntax - to parse incoming string dates with. However, even strtotime() doesn't recognize the y-m-d-h-i-s format. You can use strtotime() to convert a date string into a timestamp.

20% of 14

You are passing a string, which date() can't recognize. The second parameter to date() needs to be a proper timestamp (seconds since January 1, 1970).









20% of 14