Click or drag to resize
ZenophSMSschedule Method (NullableDateTime, String)
Sets a flag to indicate that the message should be submitted later at a specified date and time. The time portion must be in 24hr format.

Namespace: Zenoph.SMSLib
Assembly: Zenoph.SMSLib (in Zenoph.SMSLib.dll) Version: 2015.9.30.0 (2015.09.30.0)
Syntax
public void schedule(
	Nullable<DateTime> datetime,
	string gmtoffset
)

Parameters

datetime
Type: SystemNullableDateTime
The local date and time at which the message will be submitted to the recipients.
gmtoffset
Type: SystemString
The time zone to be used for datetime specified as offset from GMT.
Remarks

datetime should be a local date and time specified in 24hr format. gmtoffset is the time zone offset from GMT that should be used for datetime. When setting the date and time from a country with daylight saving time, gmtoffset must be explicitly set to the correct GMT offset that is currently being used.

To cancel message scheduling, the overloaded method schedule(NullableDateTime) needs to be called with datetime set to null.

Examples
The following code sets the date and time while also specifying the GMT offset of the time zone to be used.
// Initialise the SMS object and perform authentication
ZenophSMS sms = new ZenophSMS();
sms.setUser("account_login");
sms.setPassword("account_password");
sms.authenticate();

/*
 * set date and time for scheduling. Message should be sent at 13:45:00 local time.
 * The offset '+02:00' specifies the time zone offset to be used indicating that the
 * the specified local time (13:45:00) is 2 hours ahead of GMT time for submission.
 */
DateTime datetime = new DateTime(2015, 6, 3, 13, 45, 0);
sms.schedule(datetime, "+02:00");
It must be noted that datetime is a local time and gmtoffset is required to know the actual time that the message should be submitted. Suppose the date is set to the current date and that the current time is 13:00 local time. This means that the user wants the message to be submitted in 45 minutes time. The time zone offset '+02:00' indicates that the specified local time is on +02:00 time zone which means that the current GMT time is 11:00. The message will therefore be submitted at 11:45 GMT.
See Also