in reply to Date to Epoch

If you have a file, and need its epoch date, probably easiest is to stat it directly

$ perl -we 'print +(stat pop)[9]' myfile.txt 1521558861

Replies are listed 'Best First'.
Re^2: Date to Epoch
by ikegami (Patriarch) on Mar 20, 2018 at 20:34 UTC

    Not only is this simpler, it avoids the problem of duplicate times around a DST switch.