Comments (2)
This is definitely DST-related. I suspect this is only a UI quirk, and not impacting the query results, but I'm not certain.
@osayedTFL Are you able to look at the Network tab for either the /api/card/1234
for this card, or a .../dataset
request for this card? It would be helpful to see how this filter is represented internally. Also, what are the time zones here? (DST start/stop rules vary significantly.)
There's not really such a thing as a "date filter" for a datetime
column - the filter will need to specify the exact times at the SQL level, something like date >= 2024-04-01T00:00:00 AND date < 2024-04-27T00:00:00
.
But the latter time might not really exist, if DST skips the hour of midnight and the day begins at 1am. I think we're rendering this badly in two ways: (1) we're showing the time when we don't want to be, because one of the times is not midnight; and (2) making it look like the 26th isn't included, when the SQL might include it.
Time zones and DST are a perennial pain point in Metabase. There may be no perfect way to reconcile the time zones of (1) the query author, (2) the database being queried, and (3) the query viewer, but there's still a bug to clean up here.
from metabase.
Actually it does affect query results when filtering for 26 April specifically, especially as an "end date" in the field filter. All results for 26 April should show, but in this way it only shows results until 1 am on 26 april.
This is the day when the DST jump happened and you are correct, it was the case that the clock went straight from Midnight to 1 am. The timezone is Africa/Cairo or UTC +2. This still shouldn't happen as our db is set to UTC, but the "date" field here specifically has a data type of "DateTimeWithLocalTZ"
As for the network tab, I have here the payload of a "dataset" request.
As you can see, a "temporal unit" key is added in the field filter for some reason.
{"database":2,"type":"query","query":{"source-table":9,"filter":["between",["field",263,{"base-type":"type/DateTimeWithLocalTZ","temporal-unit":"minute"}],"2024-04-01T00:00:00","2024-04-26T01:00:00"]},"parameters":[]}
however, as stated before, this issue does not appear for everyone in my organization, when I open the request from their device, this is the payload that is sent, notice that no time units are used.
{"database":2,"type":"query","query":{"source-table":9,"filter":["between",["field",263,{"base-type":"type/DateTimeWithLocalTZ"}],"2024-04-01","2024-04-26"]},"parameters":[]}
Do let me know if you need any more information on my end and I appreciate the response.
from metabase.
Related Issues (20)
- Resolve warnings that show up during legacy to pmbql transformations
- Query button not showing up under new drop down HOT 1
- Add kondo linter for match :guard
- [dc.js migration] Improve cartesian chart performance HOT 1
- Replace all custom Kondo macroexpansions with hooks
- Update [nocache] check in prepare-frontend workflow to check the correct commit message in PRs
- Filter MultiAutocomplete now adds every intermediate value as a filter HOT 5
- Cannot change permissions when Language set to Swedish
- Floating point values become corrupted on .csv export .xlsx is fine HOT 1
- Add IP Address Logging to "Unsubscribe" Actions for Subscriptions
- `Stack values to show` setting does not work with ordinal x-axis scale
- Stop loading most of the BE while compiling CLJS
- Fingerprint of Large Binary Fields Crashes Metabase HOT 1
- When Metabase is running on http, SameSite=none will break authentication in Chrome HOT 2
- Review and refine static dashboard props for embedding SDK
- [BE] Change column aliases for aggregations to name the original column
- Accept access_token property along jwt in JWT SSO HOT 2
- `mt/with-dynamic-redefs` stack overflows if you try to nest it HOT 2
- Percentage format is not retained within Questions
- Command Palette Icon Tweaks
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 metabase.