I've been trying to find this too. This is a question I've seen asked many times and ignored. I find it baffling that this isn't something already baked into the product. Does ANYONE know how to do this? Ideally, I'd like to get the system time and the time zone. I'm currently pulling the time zone in alerts by using a SQL query to pull from Asset Manager but not everything has that value. There should be a simple way to get the time zone and/or current time on a system natively with NPM.
Which system time? the NPM server or a network component?
If the latter, and the device supports the HostResource MIB then use UnDP to pull hrSystemDate
Why do you need this information? what are you going to do with it?
I'm going to point out that not every device supports that MIB, and it would be far better to make sure you have NTP configured on all of your network devices and make sure time is syncronized than pull the current time/timezone from a device. Note: many security audit requirements require time is synchronized on network devices, so really all you need to do is make sure that it is synced
I also have personal belief that network devices should all live in UTC and not observe daylight time (I have devices scattered across multiple time zones) and it would be/is a pain in the ass to have to correlate the output of 'show log messages' and adjust the timezones in every output.
I'm referring to the time set on a node. I am already pulling the time zone, but I'd like to also include the current time in alerts. It would be helpful to know that it has for the current time. Among other things, that can help determine if a clock is synching correctly in the first place.