4 Replies Latest reply on Apr 1, 2016 12:46 PM by pthivierge

    logging timezone setting of the local machine

    magnusst

      Good day,

      Is there a way to store the system date time offset (time zone) of the local machine to a pinpoint? I would like to use something like PE or perfmon interfance without the need for "external" coding.

       

      Best regards,

      Magnus

        • Re: logging timezone setting of the local machine
          gregor

          Hello Magnus,

           

          Thank you for this question. What looks like a simple research task turns out to be quite challenging, at least for me

           

          The task recommends an interface that is capable of collecting information from remote machines, like the PI Interface for Performance Monitoring. I however wasn't able to identify a performance object that would expose information like the local time or time zone. My internet research into that direction surprisingly also turned out a dead end but there's no guarantee that I have not overlooked something. Creating a service that would expose information like the current local time and the local time zone as Performance Counters might be possible but I understand that you don't like to write a line of code.

           

          Information like the one you are looking for is usually exposed through WMI and WMI Objects are as well available as Windows Performance Counter object, even I don't know why because querying WMI Objects usually involves a bit more efforts. Luckily OSIsoft as well offers PI Interface for Windows Management Instrumentation (WMI) that could serve your use case well. WMI classes to look at are Win32_Operatinsystem or Win32_TimeZone.

           

          After looking at possible solutions already, I am wondering what you try to accomplish because I consider the time zone offset as information that would be quite stale. Can you please elaborate on the background of your question?

          1 of 1 people found this helpful
            • Re: logging timezone setting of the local machine
              magnusst

              Thanks for your reply Gregor,

              I did much of the same research as you, but I was not aware of the OSIWMI interface. Do you know how to obtain it?

               

              Working in the Maritime Industry, we use PI onboard seagoing vessels in international shipping. Onboard systems synchronizes time settings towards GPS clock, and this results in several changes of time zone during voyages. It is important for us be aware of historical time zone changes as manual reporting routines are based on vessel local time.

               

              Best regards,

              Magnus