postlight / parser

📜 Extract meaningful content from the chaos of a web page
https://reader.postlight.com
Apache License 2.0
5.37k stars 443 forks source link

fix: handle sec & ms timestamps properly #702

Closed austinmbrown closed 1 year ago

austinmbrown commented 1 year ago

This PR addresses this issue related to date parsing.

There was a bug in the parser where time-since-epoch timestamps were treated the same whether they were seconds or milliseconds. But since new Date expects milliseconds, timestamps in seconds need to be multiplied by 1000.