|
|
|

|
Purpose |
Converts time information from the format used by the Aspen library to the ANSI C library struct tm format. |
|
|
|
|
Syntax |
#include <aspen.h> ... void AspenTimeToANSITime( ASPEN_TIME minutesSince1900, int seconds, int timeZone struct tm *localTime, unsigned long *dayOfCentury ); |
|
|
|
|
Parameters |
minutesSince1900
seconds
timeZone
localTime
dayOfCentury
|
|
|
|
|
Remarks |
If a session is not opened prior to calling this function, default time zone rules for daylight-savings or summer time will be used which may not represent the most accurate information available on the Aspen Server.
A computer’s time can be, and often is, different than the Server’s time—that is, the time zone in which the Server is collecting data can differ from the time zone in which the server is located (and, therefore, the time of the Server’s Operating System). |
|
|
|
|
Return Value |
None. |
|
|
|
|
See Also |
|
|
|
|
|
Example |
int CAspenRequestDlg::DoASPEN_GetServerTime() { int retval; struct tm localTime; char timeStr[80]; server_list *slp = list; ASPEN_GETSERVERTIME_OUTPUT serverTime; int serverTimeZone=0; CString strText; retval = AspenRequest( slp->server_session, ASPEN_GetServerTime, NULL,&serverTime);
if (!retval) { AspenTimeToANSITime( serverTime.minutes, serverTime.seconds, serverTimeZone, &localTime, NULL); strcpy(timeStr, asctime(&localTime)); strText.Format("Time: %s", timeStr); m_HistoryEdit.AppendString(strText); } return retval; } |
©2006 Aspen Research Group, Ltd. All rights reserved. Terms of Use.