A time of day item in date strings specifies the time on a given day. Here are some examples, all of which represent the same time:
20:02:00.000000 20:02 8:02pm 20:02-0500 # In EST (U.S. Eastern Standard Time).
More generally, the time of day may be given as
a number between 0 and 23,
minute is a number between 0 and
second is a number between 0 and 59 possibly followed by
.’ or ‘
,’ and a fraction containing one or more digits.
:second’ can be omitted, in which case it is taken to
be zero. On the rare hosts that support leap seconds,
may be 60.
If the time is followed by ‘
am’ or ‘
pm’ (or ‘
hour is restricted to run from 1 to 12, and
:minute’ may be omitted (taken to be zero). ‘
indicates the first half of the day, ‘
pm’ indicates the second
half of the day. In this notation, 12 is the predecessor of 1:
midnight is ‘
12am’ while noon is ‘
(This is the zero-oriented interpretation of ‘
12am’ and ‘
as opposed to the old tradition derived from Latin
which uses ‘
12m’ for noon and ‘
12pm’ for midnight.)
The time may alternatively be followed by a time zone correction,
expressed as ‘
s is ‘
hh is a number of zone hours and
mm is a number
of zone minutes.
The zone minutes term,
mm, may be omitted, in which case
the one- or two-digit correction is interpreted as a number of hours.
You can also separate
mm with a colon.
When a time zone correction is given this way, it
forces interpretation of the time relative to
Coordinated Universal Time (UTC), overriding any previous
specification for the time zone or the local time zone. For example,
+0530’ and ‘
+05:30’ both stand for the time zone 5.5 hours
ahead of UTC (e.g., India).
This is the best way to
specify a time zone correction by fractional parts of an hour.
The maximum zone correction is 24 hours.
pm’ or a time zone correction may be specified,
but not both.