PluginProbe
AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress / 11.1.0
AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress v11.1.0
11.1.1 11.1.0 11.0.5 11.0.4 11.0.3 11.0.2 11.0.1 11.0.0 10.11.1 10.11.0 10.10.2 10.10.1 10.10.0 10.9.1 trunk 10.0.0 10.0.1 10.1.0 10.1.1 10.1.2 10.1.3 10.1.4 10.2.0 10.2.1 10.2.2 All 62 releases
← All changes | back/Core/wordpress/date.php +7 -4 10.1.4 → 11.1.0 View file →
@@ -1,10 +1,13 @@
1 1 <?php
2 2
3 -function acym_getTimeOffsetCMS()
3 +defined('ABSPATH') || die('Restricted Access');
4 +
5 +function acym_getTimeOffsetCMS(): int
4 6 {
5 7 static $timeoffset = null;
6 8 if ($timeoffset === null) {
9 + //We replace the . with : WordPress give format like UTC+5.45, but we want something like UTC+5:45
7 10 $timeoffset = str_replace('.', ':', acym_getCMSConfig('offset'));
8 11
9 12 if (!is_numeric($timeoffset)) {
10 13 $timezone = new DateTimeZone($timeoffset);
@@ -14,14 +17,14 @@
14 17
15 18 return $timeoffset;
16 19 }
17 20
18 -function acym_dateTimeCMS($time)
21 +function acym_dateTimeCMS(int $time)
19 22 {
20 - return date('Y-m-d H:i:s', $time);
23 + return gmdate('Y-m-d H:i:s', $time);
21 24 }
22 25
23 -function acym_getDateTimeFormat($default = '')
26 +function acym_getDateTimeFormat(string $default = ''): string
24 27 {
25 28 $noTimeDate = [
26 29 'ACYM_DATE_FORMAT_LC1',
27 30 'ACYM_DATE_FORMAT_LC3',