跳到内容

You may sometimes want to include a timestamp on your document showing when the document was created. This can be done using the \currenttime command provided by the datetime package. By default on ShareLaTeX, the timestamp will appear as the time in GMT. You can change this to your local timezone (or any other choice of timezone) using the instructions below:

  • In your project editor window, click on “Add file” on the top of the project sidebar.
  • Select “Blank file”, and name the file latexmkrc.
  • Add the following line to the file latexmkrc (for whatever timezone is required):

$ENV{'TZ'}='America/New_York';

This will change the timezone to that of New York. A full list of the available timezones can be found here.

  Open an example in ShareLaTeX

Overleaf guides

LaTeX Basics

Mathematics

Figures and tables

References and Citations

Languages

Document structure

Formatting

Fonts

Presentations

Commands

Field specific

Class files

Advanced TeX/LaTeX