NWSMECMAToUnixTime

Converts an ECMA date and time value to a Unix time value.

Syntax

  #include <smsutapi.h> 
   
  CCODE NWSMECMAToUnixTime ( 
     ECMATime  *ecmaTime, 
     UINT32    *unixTime, 
     INT32     *tzOffset);
  

Parameters

ecmaTime

(IN) Points to the ECMA date and time value to convert.

unixTime

(OUT) Points to the Unix time equivalent of ecmaTime.

tzOffset

(OUT) Points to the offset in minutes from Coordinated Universal Time (CUT).

Return Values

The following table lists the return values associated with the function.

0x00000000

Successful

Nonzero

Cannot convert ecmaTime to valid Unix time.

Remarks

If ecmaTime.typeAndTimeZone contains an invalid type, it is set to ECMA_TIME_ZONE_UNKNOWN.

If unixTime contains local time, tzOffset contains the offset from Coordinated Universal Time. Otherwise tzOffset is set to zero.

If ECMATime contains a value before 1970, unixTime returns 0 and NWSMECMAToUnixTime returns a nonzero value.

tzOffset is always zero if unixTime contains a CUT value, and nonzero if unixTime contains a local time value.

See Also

NWSMUnixTimeToECMA