Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F7066497
D7003.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
D7003.diff
View Options
diff --git a/docs/journal.rst b/docs/journal.rst
--- a/docs/journal.rst
+++ b/docs/journal.rst
@@ -597,13 +597,34 @@
- ``timestamp`` [dict] POSIX timestamp of the date, as a dictionary with 2 keys
(``seconds`` and ``microseconds``)
+ - ``offset_bytes`` [bytes] offset of the date, in Git format (``[+-]HHMM``)
+
- ``offset`` [int] offset of the date (in minutes)
- ``negative_utc`` [bool] only True for the very edge case where the date has a
zero but negative offset value (which does not makes much sense, but
technically the git format permits)
- Example:
+ Depending on the version of ``swh-model`` used to create these objects, they may
+ have either:
+
+ * ``offset_bytes`` for objects created by ``swh-model >= 4.3.0``
+ * ``offset`` and ``negative_utc`` for objects created by ``swh-model < 5.0.0``
+
+ As a transitional format, ``swh-model >= 4.3.0, < 5.0.0`` included all fields;
+ the former should be preferred when reading, as ``offset`` and ``negative_utc``
+ are lossy.
+
+ Example of the **new** format:
+
+ .. code:: python
+
+ {
+ 'timestamp': {'seconds': 1480432642, 'microseconds': 0},
+ 'offset_bytes': b"+0300"
+ }
+
+ Example of the **old** format:
.. code:: python
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Nov 5 2024, 12:28 PM (18 w, 5 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3221914
Attached To
D7003: journal: Document the new format for gitdate.
Event Timeline
Log In to Comment