strtotime
strtotime() considered harmful?
It seems like a lot of people struggle with date/time issues in PHP, and inevitably, many of the accepted answers tend to be "Use strtotime in this way."[详细]
2023-02-16 17:10 分类:问答PHP Date / Time Problem
So I\'m trying to get the difference in days for the following dates. For one of them it works, but for the other the number is off. It should be 3.[详细]
2023-02-16 01:31 分类:问答PHP strtotime() different results of monday this week
I have a problem getting the date of monday in the current week. echo date(\'Y-m-d\',strtotime(\'monday this week\'));[详细]
2023-02-15 15:36 分类:问答strtotime returning unexpected results, relative timestamps
I am using strtotime to get some relative timestamps using a string description of the amount of time to shift forward or backward, ie \"+1 hour, 15 minutes\", \"-2 hours, 45 minutes\".[详细]
2023-02-10 21:57 分类:问答php strtotime() function returns blank/0
I have datetime data in string format like this: Sat Mar 24 23:59:59 GMT 2012 I want to convert this into a UTC timestamp, but when I try it as follows:[详细]
2023-02-10 11:13 分类:问答Is string valid for use with strtotime()?
PHP has strtotime() which assumes the input given is a string that represents a valid time. Before using strto开发者_StackOverflow社区time(), howcan I verify that the string about to be given to it is[详细]
2023-02-10 09:31 分类:问答PHP multiple values in strtotime do not work together
I am trying to get multiple values is strtotime to work together but they will not so I may be missing something or in need of a work around.[详细]
2023-02-08 16:58 分类:问答Php strtotime "rounding" end of month
Any idea why strtotime sometimes round the end of the month to the next month? for($i=1;$i<12;$i++)[详细]
2023-02-07 04:56 分类:问答strtotime & date validation (01/20/2011 vs 01/2011)
01/20/2011 = January 20, 2011 01/2011 = January 2011 Only these two formats should be allowed! i.e. 01/01/01/2011 = ERROR![详细]
2023-02-06 06:21 分类:问答How to strtotime a timestamp, OR how best to deal with SQL dates?
In my PHP app, I get dates from the MySQL database, when I format them with PHP\'s date() command. I want to tidy that up and move it all entirely to the view, rather than the retrieval. But I ran int[详细]
2023-02-04 09:40 分类:问答