So I know this question may come across a bit weird but I'm looking for a way to change what LaTeX considers the current time. (In other words what
\currenttime is for LaTeX)
I'd like to have this for easily reproducible builds of LaTeX documents. I do get the correct timestamp from somewhere externally.
So I cannot permanently change the tex file itself. In the (git) repository it must remain as
I came up with a number of possible solutions but they all seem a bit hacky to me and so I am wondering if there's a better way to do it.
These possible solutions are:
- Set the date and time of the build machine.
I'm going to use Docker anyways so I could just set the time of the build container. Though that might mess with some stuff so I'm not too keen on doing that.
- Use something like
\currenttimewith the desired timestamp.
I currently don't know what format such a timestamp needs to be in I'm sure that's trivial to google. Also I don't like that this alters the tex file itself