I am reading a PCAP with tshark. The documentation says packets belong to a specific date (12th January).
With wireshark (used in 2 different PCs), tshark and tcpdump data shown is 1th December, but the same year, so it seems to me there is a problem with data format (yyyy/mm/dd and yyyy/dd/mm).
Is it possible that my PC settings messing up timestamp shown after reading pcap or there may be an issue with the documentation?
so in pcap timestamp is native store as unix epoch
Yes. See the pcap specification.
tshark shows a timestamp equal to 1st December while documentation reports 12th january as timestamp date, since PCAP timestamp is shown as unix epoch, there is no way wireshark misinterpret timestamp due to pc settings (zone, locale, etc).
The timezone setting may affect how the timestamp is displayed, but only an extremely bizarre setting - which might not even be possible! - should not make a 43-day difference.
The locale setting will not affect how tcpdump, Wireshark, or TShark display the date; they always display year/month/day dates as YYYY-MM-DD, not as MM DD YYYY or MM-DD-YYYY or MM/DD/YYYY or DD MM YYYY or DD-MM-YYYY or DD/MM/YYYY.
You might try running tcpdump with the option -tt
, select View > Time Display Format > Seconds Since 1970-01-01 in Wireshark, or running TShark with -t e
. Those will cause the date to be displayed as seconds since the UN*X Epoch. Try converting that to a date and time; if that results in dates of 1 December rather than 12 January, that means that the dates in the file are not 12 January.