Comments (3)
It's probably because in DatePicker.vue
on line 152 date-fns.parse
is called with date + 'Z'
and format + 'X'
so the parsed value would be offset. Removing the Z (and since it's not needed anymore, also the X from format) seems to resolve the issue.
Edit: Had to also edit flatpickr format on line 135 to dateFormat: self.enableTime ? 'Y-m-d H:i' : 'Y-m-d'
to completely resolve the problem.
from twill.
The offset is intended to improve the user experience. Dates should always be stored in UTC in the database, but you don't want your users to have to do mental gymnastics with timezones when using date and time pickers in the CMS.
Are you reporting a bug with this implementation, or is it more that you were looking to disable that behavior?
from twill.
To be honest, at the point when I opened this issue I was completely oblivious to the fact that it was good practice to store UTC dates in the DB - answering your question - it's not a bug if you followed best practices, so we might as well close this. But still it would be nice to be able to store and display datetime values independently from timezones. Do you have an idea if it would be possible currently?
from twill.
Related Issues (20)
- buttonAsLink option doesn't work on Inline Repeaters
- Unable to use Fieldsets in Block HOT 1
- Clean Button missing in the Tiptap editor HOT 3
- [4.x] Refactor capsules and the way all classes are found/inferred HOT 1
- [Feature] Allow packages to register frontend components and package.json for twill:build
- Errors are not reported and displayed on production
- Undefined variable $formBuilder
- Cannot able to add table feature in wysiwyg text editor HOT 1
- Twill users creation and roles permissions HOT 7
- Connected fields using the form builder HOT 1
- Time picker js error when `allowInput` is true
- Can't unselect option from Select (form field)
- Mediables row gets recreated everytime you save
- Redirected to '/' on reset password
- [4.x] Make laravel-azure-storage a suggested dependency HOT 3
- Clicking cancel in the block editor deletes all the unsaved blocks
- Admin route returns 500 error after composer update HOT 4
- [4.x] Prefix internal Twill users module routes to prevent conflicts with another User model HOT 1
- Created at column in slugs table is always null
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from twill.