CURL.SetOptionTimeCondition
---------------------------

Sets the time

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [CURL](component_CURL.md) | [2.5](newinversion25.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "CURL.SetOptionTimeCondition"; curl; Value ) 

**MBS**( **"CURL.SetOptionTimeCondition";** /\* Sets the time \*/  
**$curl**; /\* The CURL session handle. \*/   
**$Value**) /\* The time condition. Pass 0 for none, 1 for If Modified since, 2 for If not modified since.e.g. 2 \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| curl | The CURL session handle. | $curl |
| Value | The time condition. Pass 0 for none, 1 for If Modified since, 2 for If not modified since. | 2 |

### Result

Returns "OK" on success.

### Description

Sets the time  
Pass a number as parameter. This defines how the [CURL.SetOptionTimeValue](CURLSetOptionTimeValue.md) time value is treated. You can set this parameter to CURL\_TIMECOND\_IFMODSINCE (1) or CURL\_TIMECOND\_IFUNMODSINCE (2). This feature applies to HTTP, FTP, RTSP, and FILE.  
  
The last modification time of a file is not always known and in such instances this feature will have no effect even if the given time condition would not have been met. CURL.GetCondititionUnmet can be used after a transfer to learn if a zero-byte successful "transfer" was due to this condition not matching.  
See also [TIMECONDITION](https://curl.haxx.se/libcurl/c/CURLOPT_TIMECONDITION.html) option in CURL manual.

### See also

- [CURL.GetConditionUnmet](CURLGetConditionUnmet.md)
- [CURL.SetOptionMimeOptions](CURLSetOptionMimeOptions.md)
- [CURL.SetOptionTFTPNoOptions](CURLSetOptionTFTPNoOptions.md)
- [CURL.SetOptionTimeValue](CURLSetOptionTimeValue.md)

### Blog Entries

- [Translating Insert from URL options for CURL to MBS Plugin calls](https://www.mbsplugins.de/archive/2020-12-14/Translating_Insert_from_URL_op/monkeybreadsoftware_blog_filemaker)

Created 18th August 2014 , last changed 18th August 2014

  
[CURL.SetOptionTelnetOptions](CURLSetOptionTelnetOptions.md) - [CURL.SetOptionTimeOut](CURLSetOptionTimeOut.md)

[HTML Version](CURLSetOptionTimeCondition.shtml)