Giter VIP home page Giter VIP logo

Comments (6)

jpallen avatar jpallen commented on August 30, 2024

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 :)

from clsi.

DiegoQueiroz avatar DiegoQueiroz commented on August 30, 2024

Sorry, but setting TZ variable is not an option?

Just check out these outputs:
$ echo $TZ
America/Sao_Paulo
$ date
Mon, May 18, 2015 8:35:21 AM
$ TZ=UTC date
Mon, May 18, 2015 11:35:49 AM
$ TZ=GMT-10 date
Mon, May 18, 2015 9:36:07 PM
$ TZ=Asia/Singapore date
Mon, May 18, 2015 7:37:17 PM

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.

from clsi.

jpallen avatar jpallen commented on August 30, 2024

ok, that approach might work. I'll reopen this, thanks.

from clsi.

DiegoQueiroz avatar DiegoQueiroz commented on August 30, 2024

Great! :)

from clsi.

DiegoQueiroz avatar DiegoQueiroz commented on August 30, 2024

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.

from clsi.

das7pad avatar das7pad commented on August 30, 2024

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.
You can read more about the monorepo migration at overleaf/overleaf#923.

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!

from clsi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.