Giter VIP home page Giter VIP logo

Comments (6)

srushti avatar srushti commented on August 23, 2024

That's definitely something we want to get done. We can have the requested timezone specified in config/goldberg.yml. If you'd like to do it go right ahead, if not we'll get to it soon.

from goldberg.

aakashd avatar aakashd commented on August 23, 2024

Rather than mentioning the timezone in config, shouldn't we get the timezone from request and show the date for that timezone?

from goldberg.

professor avatar professor commented on August 23, 2024

Personally, I would just modify the view to show the timestamp in the user's local timezone as defined by the machine that is running goldberg. Thus if my machine is in UTC-8, then the timestamps would all be in local time.

I suspect that this is behavior that 95% of your users would want. I wanted to check in with you before modifying the code myself to see if you agree.

There is (of course) an edge case, but I don't know if it is worth solving. If I'm on a distributed team with people all over the world, then I don't know what the exact behavior should be. Perhaps there is a javascript way to convert UTC into a local time zone.

Any thoughts?

from goldberg.

srushti avatar srushti commented on August 23, 2024

Well, personally a lot of our (at C42) projects are usually distributed (at least, with the clients being in another part of the world), so it's not quite an edgecase for us. Therefore, being able to pick up the browser's timezone would be something that would appeal to us, so @aakashd is right. I just wasn't sure if we wanted to expend the effort to do that just now, or if we could get to that later. So, a basic solution could be being able to set the timezone statically. But if you could do the complete solution (where the statically set timezone works as a default) that would be great.
And you're right, there should be a way to get the date through javascript, I'm sure jquery gives you convenient methods to access the client machine's time. In fact, with a quick google I just found https://github.com/hwki/jQuery-Timezone (I've never tried it, so I don't know if it's any good).

from goldberg.

srushti avatar srushti commented on August 23, 2024

I'm moving this to 2.0 since we already have the relative timestamps. We can revisit this at a later date.

from goldberg.

srushti avatar srushti commented on August 23, 2024

Like I'd mentioned earlier the timeago plugin solves most of the problem. Other than that, we still have the UTC timestamp as a title (tooltip) for all the builds (where timeago might not be super-useful) but where the timezone itself doesn't matter a great deal.

I'm closing this assuming local timestamps (local to the browser) aren't necessary. Let me know if that's not the case.

from goldberg.

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.