wpurrer

AF SDK Date Time Issues

Discussion created by wpurrer on Sep 6, 2013
Latest reply on Sep 6, 2013 by wpurrer

Dear all       

 

I have to AF SDK Clients installations => both with Version 2.4.1.5159
=> one Client is in Asia (Asia Time Zone + Language Settings + timezone ) and one in Europe (german time and language settings + timezone)
Server is: 3.4.390.18

 

 

 

The server is in asia

when is use the following command on both clients

 

AFValues values = mypoint.RecordedValues(new OSIsoft.AF.Time.AFTimeRange("t-1 year", "t"), OSIsoft.AF.Data.AFBoundaryType.Inside, "", false);

 

when i use the one in asia is working, not the one in europa, here i get the following error message

 

System.FormatException: The string 't-1 year' was not recognized as a valid Date Time.    at OSIsoft.AF.Time.AFTime.TryParseImpl(String parmName, String input, Nullabl e`1 referenceTime, AFTimeZone timeZone, IFormatProvider provider, Boolean throwE rrors, DateTime& result)    at OSIsoft.AF.Time.AFTime..ctor(String timeString, IFormatProvider provider)    at OSIsoft.AF.Time.AFTimeRange..ctor(String startTime, String endTime, IForma tProvider provider)    at OSIsoft.AF.Time.AFTimeRange..ctor(String startTime, String endTime)    at PIMSSpeedTEst.Program.Main(String[] args)

 

(i also tried it with other syntaxes)... always the same error 

 

 

Outcomes