Hello, in some dates I meet such examples, I do not understand what the suffixes P and A.

print date('Ymd H:i:s', strtotime('01 APR,01:55P')); // 2016-04-01 07:55:00 

For some reason I expected to get 2016-04-01 13:55:00

  • you entered your hands in the strtotime such date: D - Naumov

1 answer 1

I do not know what was intended in those places where these abbreviations came across to you. In a specific example, it is perceived as a time zone.

timezone_abbreviations_list returns, among other things, aliases

  offset hour a 3600 1 b 7200 2 c 10800 3 d 14400 4 e 18000 5 f 21600 6 g 25200 7 h 28800 8 i 32400 9 k 36000 10 l 39600 11 m 43200 12 n -3600 -1 o -7200 -2 p -10800 -3 q -14400 -4 r -18000 -5 s -21600 -6 t -25200 -7 u -28800 -8 v -32400 -9 w -36000 -10 x -39600 -11 y -43200 -12 z 0 0 

p is UTC-3, so strtotime generates a timestamp for UTC 2016-04-01 04:55:00 . Then date formats unix time based on your locale - apparently UTC + 3 - and shows 2016-04-01 07:55:00 .

The first time I meet these abbreviations. I do not know what they thought about making a list and by what logic it was done so.