Comments (4)
Merging into #250 - plan is to solve this in a central way.
from opserver.
The trick here is that SQL server is not time-zone aware here (or pretty much anywhere). So I have to do a date difference to something. Is your web server running in the same time zone as your SQL server? If that's common then I can just compare to local date time which covers the most cases we can.
And just for my own curiosity, why not run your servers on UTC time? At Stack we can't imagine the chaos of global data with non-standardized time...so I'm very curious when I come across this.
from opserver.
The web server is in the same timezone as the SQL server. They're not my servers btw, if they were then they would be on UTC :)
The reason they're not on UTC is that years ago, someone decided they should be in the local time zone. And I can't even imagine how much stuff would break if the time zone was changed.
Perhaps a call to SYSDATETIMEOFFSET()
could be cached and utilised to handle this?
from opserver.
You could convert the time to UTC with something like this (using connect_time as an example):
SELECT connect_time,
DATEADD(MINUTE, DATEDIFF(MINUTE, GETDATE(), GETUTCDATE()), connect_time) AS connect_time_utc
FROM sys.dm_exec_connections
That will work on versions earlier than SQL 2008 too. Where it falls down is the fact that during a daylight savings change it will potentially report an incorrect UTC value.
from opserver.
Related Issues (20)
- Please help to explain perNodeSettings
- DashboardSettings - Node grouping per application
- Setup non-admin user account for WMI provider
- Cluster with multiple instances
- Docker "No security provider was found!" HOT 1
- Dashboard: Fix network speed to use proper unit
- Update nugets build errors on Opserver ASP HOT 5
- Config / Default folder missing in build HOT 2
- Additional filtering in exceptions view HOT 2
- System.NullReferenceException When Oncall Schedule Doesn't Have User HOT 1
- Redis: "An invalid IP address was specified." for master node HOT 1
- Issue With OIDC Authentication
- CPU Utilization and charts not showing in IIS deployment HOT 1
- Build badge was not updated HOT 1
- Minor typo in AsynchronousCommit HOT 4
- AG Cluster Info not displaying on SQL Dashboard HOT 12
- Enhancement : Additional Metrics for Web Servers
- Error: could not deserialize access token. Expected digit
- Incorrect OIDC RedirectURL generated for instance behind reverse proxy
- Any plans about upgrade to .NET 8
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 opserver.