@matheusbsbs / matheus-bagliano / commits / 9b92c82fde
Fork 0

Minor timestamp related documentation corrections for fast-import.

As discussed on the mailing list, the documentation used here was not quite accurate. Improve upon it. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

Shawn O. Pearce committed Feb 7, 2007 at 00:51 UTC 9b92c82fde2dc42e5ec3240e673549418b88163e
1 file changed +14 -7
Documentation/git-fast-import.txt
+14 -7
@@ -151,7 +151,7 @@ the format it will use for this import by passing the format name
151 in the `--date-format=<fmt>` command line option.
152
153 `raw`::
154 - This is the Git native format and is `<time> SP <tz>`.
154 + This is the Git native format and is `<time> SP <offutc>`.
155 It is also gfi's default format, if `--date-format` was
156 not specified.
157 +
@@ -159,15 +159,17 @@ The time of the event is specified by `<time>` as the number of
159 seconds since the UNIX epoch (midnight, Jan 1, 1970, UTC) and is
160 written as an ASCII decimal integer.
161 +
162 -The timezone is specified by `<tz>` as a positive or negative offset
163 -from UTC. For example EST (which is typically 5 hours behind GMT)
164 -would be expressed in `<tz>` by ``-0500'' while GMT is ``+0000''.
162 +The local offset is specified by `<offutc>` as a positive or negative
163 +offset from UTC. For example EST (which is 5 hours behind UTC)
164 +would be expressed in `<tz>` by ``-0500'' while UTC is ``+0000''.
165 +The local offset does not affect `<time>`; it is used only as an
166 +advisement to help formatting routines display the timestamp.
167 +
166 -If the timezone is not available in the source material, use
167 -``+0000'', or the most common local timezone. For example many
168 +If the local offset is not available in the source material, use
169 +``+0000'', or the most common local offset. For example many
170 organizations have a CVS repository which has only ever been accessed
171 by users who are located in the same location and timezone. In this
170 -case the user's timezone can be easily assumed.
172 +case the offset from UTC can be easily assumed.
173 +
174 Unlike the `rfc2822` format, this format is very strict. Any
175 variation in formatting will cause gfi to reject the value.
@@ -186,6 +188,11 @@ the malformed string. There are also some types of malformed
188 strings which Git will parse wrong, and yet consider valid.
189 Seriously malformed strings will be rejected.
190 +
191 +Unlike the `raw` format above, the timezone/UTC offset information
192 +contained in an RFC 2822 date string is used to adjust the date
193 +value to UTC prior to storage. Therefore it is important that
194 +this information be as accurate as possible.
195 ++
196 If the source material is formatted in RFC 2822 style dates,
197 the frontend should let gfi handle the parsing and conversion
198 (rather than attempting to do it itself) as the Git parser has