Skip to main content

parse_source_date_epoch

Function parse_source_date_epoch 

Source
pub fn parse_source_date_epoch(v: &str) -> Option<i64>
Expand description

Interprets a SOURCE_DATE_EPOCH value; None means “use the clock”.

Observed behaviour of LuaTeX 1.22 (the value is honoured whether or not FORCE_SOURCE_DATE is set):

  • an empty value is ignored;
  • leading white space and a sign are accepted, then decimal digits that must reach the end of the value; anything else (abc, 5x, 5 , 0x10, blanks only) and values that overflow 64 bits count as 0;
  • a minus sign negates modulo 2⁶⁴; the result is then truncated to 32 bits, and negative results are ignored (-5, 4294967295), so 99999999999 means 1215752191 and 4294967301 means 5.