Skip to content

Commit 9943b88

Browse files
committed
fix bug in API Limit
1 parent fdc2e37 commit 9943b88

File tree

3 files changed

+14
-5
lines changed

3 files changed

+14
-5
lines changed

application/libraries/API_Controller.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* @category Libraries
99
* @author Jeevan Lal
1010
* @license MIT
11-
* @version 1.1.5
11+
* @version 1.1.6
1212
*/
1313
class API_Controller extends CI_Controller
1414
{
@@ -241,12 +241,12 @@ public function _limit_method(array $data)
241241

242242
$bad_date = mdate('%d-%m-%Y', time());
243243

244-
$start_date = nice_date($bad_date, 'd/m/Y h:i A'); // {DATE} 12:00 AM
245-
$end_date = nice_date($bad_date .' 12:00 PM', 'd/m/Y h:i A'); // {DATE} 12:00 PM
244+
$start_date = nice_date($bad_date .' 12:00 AM', 'd-m-Y h:i A'); // {DATE} 12:00 AM
245+
$end_date = nice_date($bad_date .' 12:00 PM', 'd-m-Y h:i A'); // {DATE} 12:00 PM
246246

247247
$start_date_timestamp = strtotime($start_date);
248248
$end_date_timestamp = strtotime($end_date);
249-
249+
250250
$where_data_ip_with_time = [
251251
'uri' => $this->CI->uri->uri_string(),
252252
'class' => $this->CI->router->fetch_class(),

fix_bug.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Fix Bug
22

3+
## v.1.1.6
4+
5+
* fix bug in API Limit
6+
37
## v.1.1.5
48

59
* If the database library did not load, the error was shown

readme.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# CodeIgniter API Controller v.1.1.5
1+
# CodeIgniter API Controller v.1.1.6
22

33
## Files
44

@@ -113,6 +113,11 @@ The name of the database table of api limit is `api_limit` by default. Which we
113113
* API Limit database table name
114114
*/
115115
$config['api_limit_table_name'] = 'api_limit';
116+
117+
/**
118+
* Set API Timezone
119+
*/
120+
$config['api_timezone'] = 'Asia/Kolkata';
116121
```
117122
Now we can use API Limit Method.
118123

0 commit comments

Comments
 (0)