-- Calculate time of day in minutes since midnight
-- for the TeX primitive @time@.
fmtTime :: HandleTeXIO m => LexerT m [Token]
fmtTime =
  let toMinutes tod =  60 * todHour tod + todMin tod
      getMinutes = show . toMinutes . localTimeOfDay . zonedTimeToLocalTime
  in (mkString . maybe "" getMinutes) <$> handleReadDate
fmtTime :: HandleTeXIO m => LexerT m [Token]
fmtTime =
  let toMinutes tod =  60 * todHour tod + todMin tod
      getMinutes = show . toMinutes . localTimeOfDay . zonedTimeToLocalTime
  in (mkString . maybe "" getMinutes) <$> handleReadDate
fmtTime =
  let toMinutes tod =  60 * todHour tod + todMin tod
      getMinutes = show . toMinutes . localTimeOfDay . zonedTimeToLocalTime
  in (mkString . maybe "" getMinutes) <$> handleReadDate