8 Replies Latest reply on Jan 18, 2017 10:52 AM by UsmanAmjad

    "Event Time" in Archive Editor is different than Windows Time

    UsmanAmjad

      Hello Everyone,

       

      Recently I had observed that the windows time and PI time are not synchronized. Initially I thought it was due to the wrong windows time. So, to correct the windows time, I corrected the time zone from UTC-08:00 to UTC+05:00. I gave it several minutes to reconcile and then I opened the "Archive Editor" and checked the archiving time there if it is matching with windows time. I observed that points archiving time (i.e.) "Event Time" was still different than the corrected windows time (as shown in the picture).

       

      Is there any "Time & Date" settings in the PI to archive the data? How can I change it?

       

      PI SMT Wrong Time.png

        • Re: "Event Time" in Archive Editor is different than Windows Time
          Ramesh125

          Hi Usman,

           

          I hope you need to change day light saving time in your PI Server. Please refer below KB article it will help you to fix this.

           

          2341OSI8 - How to change PI Server time zone setting and Daylight Saving Time (DST) rules with a custom localhost.tz fil…

           

          Let me know if this helps

            • Re: "Event Time" in Archive Editor is different than Windows Time
              UsmanAmjad

              Hi Ramesh, this is not the daylight as there is about 11 hours difference between both times:

               

              1/17/2017 3:13:43 AM

              1/17/2017 4:13 PM

               

              Don't forget to see the "AM" and "PM"

               

              Regards,

              Usman

                • Re: "Event Time" in Archive Editor is different than Windows Time
                  Ramesh125

                  Hi Usman,

                   

                  I have seen that:)  Check the time zone on your PI Server using pidiag -tz, it should be different than actual time zone on your windows server. Please update localhost.tz file according to your time zone. It will work.

                   

                  Regards,

                  Ramesh M

                  1 of 1 people found this helpful
                    • Re: "Event Time" in Archive Editor is different than Windows Time
                      UsmanAmjad

                      Hi Ramesh.

                       

                      Following are the timezone settings through pidiag -tz. The time zone I selected on my windows is UTC+05:00 (originally it was UTC-08:00 as staed in my first question).

                       

                      Timezone.png

                        • Re: "Event Time" in Archive Editor is different than Windows Time
                          vkaufmann

                          Usman,

                           

                          To change the timezone of your PI server, you will want to download the proper localhost.tz file for your region. By your offset it sounds like your server is somewhere in Asia or Russia. You can find the file you need here:

                           

                          https://techsupport.osisoft.com/Downloads/All-Downloads/All-Groups/All-Products/All-Categories/All-Versions/localhost

                           

                          To apply, you can follow the steps provided in the solution section in this KB.

                           

                          2341OSI8 - How to change PI Server time zone setting and Daylight Saving Time (DST) rules with a custom localhost.tz fil…

                           

                          --Vince

                            • Re: "Event Time" in Archive Editor is different than Windows Time
                              UsmanAmjad

                              Hi Vincent,

                               

                              Let me tell you little history so that you can guide what has occurred. Everything was running fine till the day before yesterday. On yesterday I connected the system with my headoffice through teamviewer on internet. Later the same day I had found that the time zones and setting in the windows time are automatically changed as UTC-8:00, but I didn't check if the PI archiving is also changed or not. Anyway, I moved the windows time zone back to UTC+5:00 and then checked PI archiving time in "Archive Editor" and observed that PI archiving has been shifted back to previous times of around 13 hours back.

                               

                              Coming to the problem now, I just have compared the time settings in PI SMT. I have opened the following windows in SMT from View>Settings here the time appearing in the "Time Format" tab is the PI configured time (highlighted as red) which is 13 hour delayed compared to windows current time (highlighted as yellow). When I click on the blue Globe of Earth (highlighted as green), another window of "Region and Language" opens up and here the time appearing (highlighted as red) is same as windows time (highlighted as yellow).

                               

                              So everything is mixed up and so my mind.

                               

                              Timezone-1.png

                               

                              I am in Pakistan (Asia Region) and there is no localhost.tz file for my region on the link that you have mentioned. How can I get it?

                               

                              Regards,

                              Usman

                              • Re: "Event Time" in Archive Editor is different than Windows Time
                                UsmanAmjad

                                Hi Vincent & Ramesh,

                                 

                                I resolved the problem with much simpler way and what I understood on what has happened is as follows:

                                 

                                When the server was installed the windows time zone might had been selected as PST (or UTC-08:00) compared to the Asia region time zone of UTC+05:00. Whoever had installed the windows, manually changed the date and time of windows for Asia region but kept the time zone as original (i.e.) UTC-08:00. As I connected the server to the internet for remote access through team viewer, the windows has updated the manually changed time and date with respect to the time zone UTC-08:00 which caused the time difference of about 13 hours and moved the PI archiving to 13 hours back. This happened because there was a check on the "Auto Synchronize" time with an internet time server. My windows time and PI archiving time was same but according to UTC-08:00.

                                 

                                Adding insult to the injury, I changed the windows time zone to UTC+05:00 to make it correct after all the above crap. It didn't effect any changes to the PI archiving time and that stayed to UTC-08:00. I gave the system a break of about 12 hours.

                                 

                                When I arrive today in the plant I observed no change in the archiving instead the archiving had stopped as snapshot time was reached (when PI archiving moved to 13 hour back the snapshot time in the "Point Builder" was of 13 hour ahead). I changed back the windows time zone from UTC+05:00 to UTC-08:00. Gave it 1 min and then I changed the windows time manually, uncheck the "Auto Synchronize time with an internet time server". Gave it 5 minutes and then completely shut down the server followed by the restarted to ensure proper refreshing of the communication. The date & time both in windows and PI SMT were synchronized and "Archive Editor" was logging the values correctly. Following is the update compared to my previous post:

                                 

                                 

                                Timezone-2 Resolved.png

                          • Re: "Event Time" in Archive Editor is different than Windows Time
                            vkaufmann

                            Hi Usman,

                             

                            Ramesh is not leading you astray, the PI Data archive stores all timestamps internally in their UTC representation and are converted client side to reflect whatever is kept in your localhost.tz configuration. This might differ from what the Windows timezone is set to on the server. Check that the timezone is what you expect by running piadiag -tz like Ramesh has suggested and verify the timezone your PI server is set to. The document Ramesh provided should help if you have any more questions.

                             

                            --Vince 

                            1 of 1 people found this helpful