Share via


CReplicationServer.EventTimeToLocalTime Method

Converts a date-time value to the local time zone value.

object EventTimeToLocalTime(object eventTime) 

Parameters

  • eventTime
    The time to convert. By default, the event time is in Coordinated Universal Time (Greenwich Mean Time or UTC).

Return Value

The time, converted to the local time zone.

Remarks

You must have CSS administrator or operator permissions to call this method.

The CReplicationServer.EventTimeToLocalTime method corresponds to the COM method named ReplicationServer.EventTimeToLocalTime.

Example

The following example converts the time specified in UTC to local time for the server.

CReplicationServer replicationServer = new CReplicationServer();
  replicationServer.Initialize("");
  DateTime localTime;
  DateTime UTCTime = DateTime.Now;
  localTime = Convert.ToDateTime(replicationServer.EventTimeToLocalTime(UTCTime));

See Also

Other Resources

CReplicationServer Class