TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a way I can specify the timezone LaTeX should use when printing the \today and \currenttime (or the datetime package in general)?

I need this because travisCI does build my PDF automatically on every commit and their timezone seems to be set to GMT. I'd need GMT+1.

Contrary to some other questions I don't want the timezone to be displayed, I just want the date & time to be in the specified timezone.

For building I use latexmk with pdflatex set to LuaLaTeX.

share|improve this question
I set now the environment variable "TZ" to be "Europe/Zurich" and it seems to work at least on my local machine. Will try it on travis as well now. If it works, I'll close it. – Michael Weibel Mar 6 '13 at 7:13
Welcome to TeX.sx! If you find a solution that works wel, you could provide an answer to your own question rather than cloing it. Remember that others may want to solve similar problems in the future. – Peter Jansson Mar 6 '13 at 7:26
Thanks for the edit & the info (sorry for not formatting it properly). Yes that's what I actually intended to do - wrong naming ;) – Michael Weibel Mar 6 '13 at 7:30
up vote 5 down vote accepted

Immediately after asking this question an idea came to my mind which worked out.

In order to specify the timezone you can just set the usual linux environment variable TZ before building the PDF.

As an example if you have a Makefile which builds it on running make you can set it like this: TZ='Europe/Zurich' make

Or, of course, export it before running the build using export TZ='Europe/Zurich'.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.