-
Notifications
You must be signed in to change notification settings - Fork 56
Support custom timezones #24
Comments
In principle, we'd love to make this possible. In practice, it's very very hard. LaTeX takes it's time from the system time, with no way that I know to easily override \today with a custom timezone. There can only ever be one system time on a server, so supporting multiple timezones in an API that serves many users at once currently seems impossible. I'm open to clever workarounds though if someone can find one :) |
Sorry, but setting TZ variable is not an option? Just check out these outputs: So setting TZ variable before call latex binary should work as well. I just to not own a LaTeX environment ready to test it, but I think this simple change may do the trick. |
ok, that approach might work. I'll reopen this, thanks. |
Great! :) |
Just to help this implementation, there is a full documentation of TZ variable at http://www.gnu.org/software/libc/manual/html_node/TZ-Variable.html. Also, it would be incredible if the implementation be able to handle Daylight Saving Times (DST). I think ShareLatex UI can guess user's timezone using JavaScript and pass this info to the API. This way, we avoid the need to keep a table to inform the DST start/end dates of each country (that would be a pain), or force the user to select its timezone/DST info. |
Hi! Thank you for taking the time to write up this issue. We are in the process of migrating to a monorepo at https://github.com/overleaf/overleaf and will mark this repository read-only soon. We are going to close this issue now to avoid any confusion about the inability to comment further. If you believe this issue still needs addressing, please create a new issue at https://github.com/overleaf/overleaf. Thanks again! |
When I use macros like \today, ShareLatex produces the document using server's system date.
Since the user can be in a different timezone, the document may be produced with an unexpected date.
To illustrate the problem, the current time where I live is May 17, 2015, 11:00pm (Brazil oficial time, GMT-3), but when I compile a document in ShareLatex, \today returns "May 18, 2015".
I think the API should have a timezone setting, so the datetime can be adjusted before compiling the document. The UI can also have an option to allow the user to select its timezone.
The text was updated successfully, but these errors were encountered: