diff options
author | Ondřej Vašík <ovasik@redhat.com> | 2008-08-30 15:04:04 +0200 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2008-09-04 14:51:29 +0200 |
commit | ec560ef5cab3aec7a68fb2da6b2dbbbd7415caf1 (patch) | |
tree | d54466cd430201f92d64a4d0f2ed85055c2c2430 /doc | |
parent | 73a86480745283afaf33a9c5978b3fab495bfe32 (diff) | |
download | gnulib-ec560ef5cab3aec7a68fb2da6b2dbbbd7415caf1.tar.gz |
getdate.y: reject an out-of-range timezone value
* lib/getdate.y (time_zone_hhmm): Reject any TZ offset that is outside
the range [-24...+24]. When specified with only one or two digits,
* tests/test-getdate.c: Tests for the fix.
* doc/getdate.texi: Document this change.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/getdate.texi | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/doc/getdate.texi b/doc/getdate.texi index eae4526b48..7175e3d5f2 100644 --- a/doc/getdate.texi +++ b/doc/getdate.texi @@ -265,16 +265,19 @@ which uses @samp{12m} for noon and @samp{12pm} for midnight.) The time may alternatively be followed by a time zone correction, expressed as @samp{@var{s}@var{hh}@var{mm}}, where @var{s} is @samp{+} or @samp{-}, @var{hh} is a number of zone hours and @var{mm} is a number -of zone minutes. You can also separate @var{hh} from @var{mm} with a colon. +of zone minutes. +The zone minutes term, @var{mm}, may be omitted, in which case +the one- or two-digit correction is interpreted as a number of hours. +You can also separate @var{hh} from @var{mm} with a colon. When a time zone correction is given this way, it forces interpretation of the time relative to Coordinated Universal Time (@sc{utc}), overriding any previous specification for the time zone or the local time zone. For example, @samp{+0530} and @samp{+05:30} both stand for the time zone 5.5 hours -ahead of @sc{utc} (e.g., India). The @var{minute} -part of the time of day may not be elided when a time zone correction -is used. This is the best way to specify a time zone correction by -fractional parts of an hour. +ahead of @sc{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. Either @samp{am}/@samp{pm} or a time zone correction may be specified, but not both. |