Giter VIP home page Giter VIP logo

Comments (2)

ghiscoding avatar ghiscoding commented on August 11, 2024

isn't tzDate() enough though? I asked similar question for UTC in an issue that I closed not long after getting more info from the author in this comment

So yes, if you want to create the utc time, in utc you can do tzDate('2020-02-04', 'utc'), but you can also do tzDate('2020-02-04T09:30', 'America/New_York') which would return a Date object (utc timestamp) for 9:30am on Feb 4th, 2020 in new york.

see tzDate docs

from tempo.

joelstein avatar joelstein commented on August 11, 2024

Thank you. I'm primarily concerned with formatting the dates. All of my dates come from the server in UTC, but I always want them displayed in the website's local timezone (which may be different than the user's timezone).

That's why I think being able to set a default format (or display) timezone would be useful.

As it is now, I have to remember to set the timezone in every call to format() (and there are many in this application we're building).

from tempo.

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.