HinTak / Font-Validator

Font Validator is a tool for testing fonts prior to release. This testing ensures that fonts meet Microsoft's high quality standards and perform exceptionally well on Microsoft's platform.
Other
146 stars 12 forks source link

The modified time is an unlikely value #66

Closed devosb closed 3 years ago

devosb commented 3 years ago

The title of this issue comes from W1311. I think there is a bug in this warning. The font gets a timestamp when built, and the timezone used seems to be UTC. So for a font I just built, at 08:46 in North America (UTC-7) FontValidator reports a time of 15:46. But if timezones are ignored, 15:46 is in the future compared to 08:46, and I suspect being in the future counts as unlikely. If I wait just over 7 hours before re-running (and not rebuilding the font) then FontValidator does not give this error when checking the (by then) 7+ hour old font.

HinTak commented 3 years ago

The spec indeed says values are in UTC : https://docs.microsoft.com/en-us/typography/opentype/spec/head - I 'll see what the code says.

HinTak commented 3 years ago

Should be fixed in https://github.com/HinTak/Font-Validator/commit/a34447e499a3f6dde375eceb8d75b69c647fd854 . I think the main problem is that 1904 Jan 1 was taken as local.