If I have a datapoint in time, acquired from XrtMakeTime(100,5,5,12,25,40), and I plot it on a graph, I get a time that's a few hours off what it should be.
If I use this value later as the XtNxrtTimeBase, and start my data from 0, it displays as the proper time. What's going on?
XtNxrtTimeBase represents the starting point of any time measured data in the number of seconds from January 1, 1970 GMT. It takes the default value of January 1, 1970 LOCAL time, in relation to January 1, 1970 GMT. So if you are in a time zone that is +5 hours from GMT, the default value of XtNxrtTimeBase will be 18000 (the # of seconds from Jan 1, 1970 GMT)
XrtMakeTime() is meant to be used to obtain a value for XtNxrtTimebase, not as a method of obtaining a data point value. It takes the date and time you give it, and returns the number of seconds from GMT. If you put this number in as a data point, it will be offset by the value stored in XtNxrtTimeBase.
If your data is being created from an external source, you must make sure that the values properly take into account the default XtNxrtTimeBase.