cancel
Showing results for 
Search instead for 
Did you mean: 

PCo 2.1 OLEDB against GE Proficy Historian

Former Member
0 Kudos

PCo 2.1.6

MII 12.1.8

GE Proficy Historian 4.0

Hey everyone. I found something interesting with PCo OLEDB against GE Proficy Historian. I haven't tried it against Pi yet to see if I can repeat. All of my queries are coming back with timestamps in GMT. Yes, I tried setting the Variant Representation to "First" and unchecking "Convert Date and Time Values of Server to UTC" Doesn't make a difference. MII knows the timestamp column is a timestamp (it comes back with datatype 93, and MII displays the values in ISO time format.

Historian has its own OLEDB query tool that I ran on the server.

Its rather annoying as I have to go back and adjust all the recordset timestamps local server time using BLS. Has anyone else seen this?

Accepted Solutions (0)

Answers (1)

Answers (1)

agentry_src
Active Contributor
0 Kudos

Hi Doug,

How does Proficy store the raw data in their files? Is it stored as UTC and then converted to the local time?

Regards,

Mike

Former Member
0 Kudos

It actually stores the data in Epoch time. Then it translates the timestamps to the client timezone, relative to the server timezone. For instance, if you are in Central Time Zone, and you query a Historian that sits in Eastern time zone, your will see time stamps with a -1 hour bias. However in this case PCo sits on the historian server in central time, while the MII development machine sits on a server in eastern time. (Lovely eh? I have no control over this...) When I perform an OLEDB query locally using the built in tool, on the machine that has the historian running on it, I get timestamps in central time zone. However, queries by the MII server always come back in GMT no daylight savings.

I was assuming, that since PCo resides on the Historian machine, that Historian would see its "Client" (in this case PCo) as also being in Central Time Zone, considering its on the same machine, However this is apparently not the case.

Either way I think I found a more elegant solution than doing a dateaddhours() in my BLS, I wrote a quick JSP page that returns the GMT bias, including DST, The OLEDB provider has a timezone setting that I will pass that to my OLEDB query as a parameter and it should give me the correct time zone.

I will keep you updated with what I find.

Edited by: Doug Holtke on Sep 15, 2011 2:13 PM

agentry_src
Active Contributor
0 Kudos

Two questions:

What is Epoch time?

Can you provide the jsp content?

Thanks,

Mike

Former Member
0 Kudos

Epoch time is the number of seconds since Midnight of January 1, 1970.

I put the code for the JSP page in an seperate thread I started a few days ago.

[;

agentry_src
Active Contributor
0 Kudos

Hi Doug,

I just passed it to another thread (Mona's got a similar problem). You should go post and pick up some points.

Regards,

Mike