From f0249a02bb2b4c0fb043c0592ac2f56c1c57500c Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Fri, 20 Mar 2009 14:39:05 +0000 Subject: [PATCH] Try harder to decode the manufacturing date. git-svn-id: http://lm-sensors.org/svn/i2c-tools/trunk@5705 7894878c-1315-0410-8ee3-d5d059ff63e0 --- CHANGES | 1 + eeprom/decode-dimms | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/CHANGES b/CHANGES index f67b192..5a2c783 100644 --- a/CHANGES +++ b/CHANGES @@ -9,6 +9,7 @@ SVN Fix decoding of SDR SDRAM bytes 12-14 Add side-by-side formatting option Add merged cells formatting option + Try harder to decode the manufacturing date decode-xeon: Delete i2c-stub-from-dump: Use udev settle to speed up initialization diff --git a/eeprom/decode-dimms b/eeprom/decode-dimms index 3d2c9e4..f00fab1 100755 --- a/eeprom/decode-dimms +++ b/eeprom/decode-dimms @@ -1336,6 +1336,10 @@ sub manufacture_date($$) # Note that this heuristic will break in year 2080 return sprintf("%d%02X-W%02X", $year >= 0x80 ? 19 : 20, $year, $week); + # Fallback to binary format if it seems to make sense + } elsif ($year <= 99 && $week >= 1 && $week <= 53) { + return sprintf("%d%02d-W%02d", + $year >= 80 ? 19 : 20, $year, $week); } else { return sprintf("0x%02X%02X", $year, $week); }