valor-software / ngx-bootstrap

Fast and reliable Bootstrap widgets in Angular (supports Ivy engine)
https://valor-software.com/ngx-bootstrap
MIT License
5.53k stars 1.69k forks source link

Add UTC timezone support to timepicker #5635

Open jonrimmer opened 4 years ago

jonrimmer commented 4 years ago

Is your feature request related to a problem? Please describe.

When building apps that work across timezones, it is frequently necessary to show/capture dates and times in a different timezone that the user's local one.

BsDatepickerConfig now has a useUtc property for showing/capturing UTC dates/date ranges, but timepicker does not have the same support.

Describe the solution you'd like

Add support for an equivalent useUtc property to Timepicker / TimepickerConfig.

Describe alternatives you've considered

Somebody already did all the work to add full timezone support to timepicker in this PR:

https://github.com/valor-software/ngx-bootstrap/pull/4747

But nobody could be bothered to review it, so the author closed it. Maybe it could be resurrected?

daniloff200 commented 4 years ago

Well, 4747 is really outdated, and it's sad, that the author of this closed it :( Sad, that he doesn't tag any person, which was merging / reviewing code at the time, or, author of the library :( I'm gonna try to resolve all conflicts, or, create a new PR, and see, what can be done here

daniloff200 commented 4 years ago

lol, do the @jonrimmer and @jonr-elsewhen are exactly the same person? :rofl:

jonr-elsewhen commented 4 years ago

@daniloff200 Almost, one is me at work, one isn't ;-)

juicyarts commented 4 years ago

Sorry for the circumstances. Our PO decided that this is not important any more after some days of work on it.. Let me know if i can help

daniloff200 commented 4 years ago

hey @juicyarts ! I fixed all the conflicts in your PR, but, there are some test failures, and I'm not 100% sure, how to fix them

DanielMcAssey commented 3 years ago

Can this be fixed/implemented? Its been a year and a half.

daniloff200 commented 3 years ago

@DanielMcAssey not sure about that right now, we've made a huge reworks during this year and 4747 PR is really abandoned & outdated and requires a big amount of changes

juicyarts commented 3 years ago

Hey folks. Sorry for this mess. As much as i would like to help out, i'm too far away from angular and this library for some years now and not sure if i will manage to get back into it to finish the ideas from three years ago. I would start a last try this weekend to see if this can be properly migrated and cleaned up in a way that you can at least proceed to finish it. If this does not result in a meaningful outcome i'll get back here next week and inform you. If thats the case i would suggest you don't rely on me for this any longer and start things from scratch.

juicyarts commented 3 years ago

I added https://github.com/valor-software/ngx-bootstrap/pull/6322 for the Utc behaviour alignment with the datepicker and https://github.com/juicyarts/ngx-bootstrap/pull/1 (based on the utc branch, no MR opened yet) for the offset addition if needed. https://github.com/valor-software/ngx-bootstrap/pull/4747 was closed in favor of these two branches.

Unfortunately i have a lot of trouble running (all) the tests suites locally so if the general behaviour is what was requested maybe someone else could take over here to add dedicated e2e tests and verifying the unit tests are running as needed. I'm sorry that i can't contribute much more for the time being

on3dd commented 1 month ago

No updates for almost 5 years? The fact that timepicker uses the timezone literally makes no sense in real world apps

juicyarts commented 1 month ago

I'm out of this topic, this just halted years ago.