Tempus-dominus: Default timezone issue

Created on 12 Jun 2016  路  3Comments  路  Source: Eonasdan/tempus-dominus

Hi there!

Just started using the component and i lost the last 2-3 hours to find out why the date/time parsing does not work properly and why when every time my input field gets focused dates + times get changed automatically (by itself).

It turned out that you have defined in the default options for timezone to be: Etc/UTC.

I believe this should either be added to the docs (that by default the component expects UTC based date/time values) - or - to disable timezone support by default - unless set otherwise.

As soon as i disabled timezone support everything started working properly. I am passing GMT+3 times values.

v4

Most helpful comment

It would be incredibly helpful if there was a simple switch to simply disable all timezones, particularly when working only with date selectors. It's a lot of extra code I have to remember to write in all of my projects to always set the dates to startOf('day') to ensure a local time zone conversion doesn't slip into my app somewhere.

All 3 comments

Just fixed it in my fork - let me know if you think it's a useful addon to your great component!
https://github.com/miraclebg/bootstrap-datetimepicker

It would be incredibly helpful if there was a simple switch to simply disable all timezones, particularly when working only with date selectors. It's a lot of extra code I have to remember to write in all of my projects to always set the dates to startOf('day') to ensure a local time zone conversion doesn't slip into my app somewhere.

Hello. Thanks for using my project. We鈥檙e closing all tickets/prs for v4 as it is no longer supported. We鈥檙e making way for a new version. Please read this blog post

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lllopo picture lllopo  路  7Comments

sabique picture sabique  路  5Comments

sjvisschers picture sjvisschers  路  5Comments

gouthamgit picture gouthamgit  路  4Comments

am11 picture am11  路  6Comments