Question about timezones in commit & tag dates

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
while working on correct key rollover and verifying signatures for past
commits for the ssh signing topic i am trying to understand how Git
deals with timestamps for commits & tags.
For ssh signing the user will manage expiration times within their
allowedSigners file. Those timestamps do not carry a timezone and i
would assume a user (or automatic generation of this file) will assume
the systems timezone for them.
Therefore i wanted to pass the commit & tags timestamps adjusted to the
system timezone to make sure key rollover will have no gaps or failed
verification's especially when commit and system timezone differ greatly
and might roll over to another day.

However the commit & tags structs only seem to carry the objects
timestamp as is, simply ignoring any timezone information. For the ssh
feature i can easily enough parse the ident line again from the object
header. But while looking at the usage of the existing date fields i can
see that objects are sometimes sorted on and compared by these dates.
When commands provide cut off times (--since) i think they might include
or exclude commits erroneously when they were made in a different
timezone around the cutoff date. ("log --since" indeed gives me some
unexpected results when mixing multiple timezones. Based on some simple
testing i think it just stops output when a commit falls outside of this
window, even though there might be one before it wich is within)

Is my understanding of this correct and this the expected behaviour?
I think generally for git this does not matter much. But in certain
situations this is problematic.

I would have assumed that git would either add the timezone as well or
adjust the commit timestamp upon populating the date field in the commit
struct to UTC but i could not find anything like it.

Best regards,
Fabian



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux