I'm struggling to troubleshoot a date filter and would be grateful for any assistance...
From searching on here, it seems that the likely cause has to do with timezones, but I don't see where the issue lies.
- The column in question is just a "date" datatype. No time.
- Metabase Report Timezone is correctly set to America/Los_Angeles.
- Database is SQL Server. If I query SYSDATETIMEOFFSET(), it shows the correct current time with offset (-08:00).
If I set the filter widget to "Current Day", it returns the correct data. But if I set it to "On", and choose today's date, the result is different - it shows tomorrow's data! Regardless of any timezone mismatches, I'd think that "Current Day" and explicitly setting the current day's date should not return two different results.
Diagnostic Info:
{
"browser-info": {
"language": "en-US",
"platform": "Win32",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:95.0) Gecko/20100101 Firefox/95.0",
"vendor": ""
},
"system-info": {
"file.encoding": "Cp1252",
"java.runtime.name": "Java(TM) SE Runtime Environment",
"java.runtime.version": "1.8.0_181-b13",
"java.vendor": "Oracle Corporation",
"java.vendor.url": "http://java.oracle.com/",
"java.version": "1.8.0_181",
"java.vm.name": "Java HotSpot(TM) Client VM",
"java.vm.version": "25.181-b13",
"os.name": "Windows Server 2012 R2",
"os.version": "6.3",
"user.language": "en",
"user.timezone": "America/Los_Angeles"
},
"metabase-info": {
"databases": [
"sqlserver",
"h2"
],
"hosting-env": "unknown",
"application-database": "h2",
"application-database-details": {
"database": {
"name": "H2",
"version": "1.4.197 (2018-03-18)"
},
"jdbc-driver": {
"name": "H2 JDBC Driver",
"version": "1.4.197 (2018-03-18)"
}
},
"run-mode": "prod",
"version": {
"tag": "v0.41.3.1",
"date": "2021-12-02",
"branch": "release-x.41.x",
"hash": "20f9097"
},
"settings": {
"report-timezone": "America/Los_Angeles"
}
}
}
Edit:
I took the generated sql from the two questions and ran them in SSMS, with the same mismatched results. I still don't understand why, though...