Page 143 - Open Soource Technologies 304.indd
P. 143
Open Source Technologies
Notes
Table 3: Date/Time Formats as Understood by strtotime()
Date String GMT Formatted Date Remarks
11970-0917 1970-09-16 23:00:00 ISO 8601 preferred date.
9/17/72 1972-09-16 23:00:00 Common U.S. way (d\m\yy)
24 September 1972 1972-09-23 23:00:00 Without any specified time, 0:00 is
used. Because the time zone is set to
24 Sep 1972 1972-09-23 23:00:00
MET (GMT+1), the GMT formatted
Sep 24, 1972 1972-09-23 23:00:00 date is in the previous day.
20: 02: 00 2004-03-01 19:02:00 Without any date specified, the
20:02 2004-03-01 19:02:00 current date is used.
8: 02pm 2004-03-01 19:02:00
20:02-0500 2004-03-02 01:02:00 –0500 is the time zone (EST)
20:02 EST 2004-03-03 01:02:00
Thursday 2004-03-03 23:00:00 A day name advances to the first
available day with this name. In
1 Thursday
case the current day has this name,
this Thursday the current day is used.
2 Thursday 19:00 2004-03-11 18:00:00 2 is the second Thursday from now.
Next Thursday 7 pm 2004-03-11 18:00:00 Next means the next available day
with this name after the first avail-
able day, and thus is the same as 2.
last Thursday 19:34 2004-02-26 18:34:00 The Thursday before the current
day. If the name of the day is
the same as the current day, the
timestamp of the previous day is
used.
1 Year 2 days ago 2003-02-27 21:25:44 The current time is used to calculate
–1 Year –2 days 2003-02027 21:25:44 the relative displacement with
–1 year 2 days 2003-03-03 21:25:44 The-Sign is needed before every
1 year –2 days 2005-03-27 21:25:44 displacement unit; ifit’s not used,
tomorrow 2004-03-02 21:25:44 + is assument. If “ago” is postfixed,
Yesterday 2004-03-29 21:25:44
the meaning of + and – is reversed.
Other possible units are second,
minute, hour, week, Month, and
fortnight 914 days).
20040301 T00:00:00_1900 2004-02-29 05:00:00 Used for WDDX parsing.
Contd...
138 LOVELY PROFESSIONAL UNIVERSITY