File tree Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -162,6 +162,7 @@ parameters:
162
162
- Entity
163
163
- Events
164
164
Email :
165
+ - I18n
165
166
- Events
166
167
Entity :
167
168
- I18n
Original file line number Diff line number Diff line change 12
12
namespace CodeIgniter \Email ;
13
13
14
14
use CodeIgniter \Events \Events ;
15
+ use CodeIgniter \I18n \Time ;
15
16
use Config \Mimes ;
16
17
use ErrorException ;
17
18
@@ -2038,8 +2039,8 @@ protected function sendData($data)
2038
2039
// See https://bugs.php.net/bug.php?id=39598 and http://php.net/manual/en/function.fwrite.php#96951
2039
2040
if ($ result === 0 ) {
2040
2041
if ($ timestamp === 0 ) {
2041
- $ timestamp = time ();
2042
- } elseif ($ timestamp < (time () - $ this ->SMTPTimeout )) {
2042
+ $ timestamp = Time:: now ()-> getTimestamp ();
2043
+ } elseif ($ timestamp < (Time:: now ()-> getTimestamp () - $ this ->SMTPTimeout )) {
2043
2044
$ result = false ;
2044
2045
2045
2046
break ;
Original file line number Diff line number Diff line change 11
11
12
12
// CodeIgniter Date Helpers
13
13
14
+ use CodeIgniter \I18n \Time ;
15
+
14
16
if (! function_exists ('now ' )) {
15
17
/**
16
18
* Get "now" time
17
19
*
18
- * Returns time () based on the timezone parameter or on the
20
+ * Returns Time::now()->getTimestamp () based on the timezone parameter or on the
19
21
* app_timezone() setting
20
22
*
21
23
* @param string $timezone
@@ -27,7 +29,7 @@ function now(?string $timezone = null): int
27
29
$ timezone = empty ($ timezone ) ? app_timezone () : $ timezone ;
28
30
29
31
if ($ timezone === 'local ' || $ timezone === date_default_timezone_get ()) {
30
- return time ();
32
+ return Time:: now ()-> getTimestamp ();
31
33
}
32
34
33
35
$ datetime = new DateTime ('now ' , new DateTimeZone ($ timezone ));
You can’t perform that action at this time.
0 commit comments