Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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

1 Answer 1

up vote 4 down vote accepted

Immediately after asking this question and 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

 
discard

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.