Date and Time form output - Format Fix hack - stopped working after upgrade to concrete5 v 5.6.3.1

Permalink
This hack is in regards to the Date and Time output that is shown on a form received by emailed. The following Date and Time format fix hack worked great until I upgraded to the latest version of concrete5. The edits are still there, it just doesn't work anymore. Maybe the newest version looks at a new file location but I'm not sure.


Edited the following file:
/var/www/mo-office/concrete/core/helpers/form/date_time.php

Look for this section:
$dt = date('Y-m-d', strtotime($arr[$field . '_dt']));
if (DATE_FORM_HELPER_FORMAT_HOUR == '12') {
$str = $dt . ' ' . $arr[$field . '_h'] . ':' . $arr[$field . '_m'] . ' ' . $arr[$field . '_a'];
} else {
$str = $dt . ' ' . $arr[$field . '_h'] . ':' . $arr[$field . '_m'];
}
return date('Y-m-d H:i:s', strtotime($str));
} else if (isset($arr[$field])) {
if ($arr[$field] == ) {
return ;
}
$dt = date('Y-m-d', strtotime($arr[$field]));
return $dt;

Change the following (including UPPER/lower case) from:
Y-m-d And H:i:s

To:
D, Y-M-d, And g:iA

This will change the dates in the body of the emails from this:
2014-01-29 13:45:00

To this:
Wed, 2014-Jan-29, 1:45PM


# concrete5 Version
5.6.3.1

# concrete5 Packages
Constants Info (1.1), earthling two theme (1.4), Fancy Image Links (1.3.7), Galleria image gallery (2.0), Pixo Form Templates (1.0.1).

# concrete5 Overrides
mail/block_form_submission.php.orig, mail/block_form_submission.php.new, mail/block_form_submission.php, single_pages/OCC-banner-small.png, single_pages/single_pages.css, single_pages/TicketMasterZ.jpg, single_pages/quick-help-ne-itic-view-ticket, single_pages/quick-help-mo-itic-view-ticket, single_pages/onecallbanner.gif

# concrete5 Cache Settings
Block Cache - On
Overrides Cache - On
Full Page Caching - On - If blocks on the particular page allow it.
Full Page Cache Lifetime - Every 60 minutes.

# Server Software
Apache/2.2.22 (Ubuntu)

# Server API
apache2handler

# PHP Version
5.4.6-1ubuntu1.8

# PHP Extensions
apache2handler, bcmath, bz2, calendar, Core, ctype, curl, date, dba, dom, ereg, exif, fileinfo, filter, ftp, gd, gettext, hash, iconv, intl, json, libxml, mbstring, mcrypt, memcached, mhash, mysql, mysqli, mysqlnd, openssl, pcre, PDO, pdo_mysql, Phar, posix, Reflection, session, shmop, SimpleXML, soap, sockets, SPL, standard, sysvmsg, sysvsem, sysvshm, tokenizer, wddx, xml, xmlreader, xmlrpc, xmlwriter, Zend OPcache, zip, zlib.

# PHP Settings
max_execution_time - 30
log_errors_max_len - 1024
max_file_uploads - 40
max_input_nesting_level - 64
max_input_time - 60
max_input_vars - 1000
memory_limit - 128M
post_max_size - 40M
sql.safe_mode - Off
upload_max_filesize - 40M
mysql.max_links - Unlimited
mysql.max_persistent - Unlimited
mysqli.max_links - Unlimited
mysqli.max_persistent - Unlimited
pcre.backtrack_limit - 1000000
pcre.recursion_limit - 100000
session.cache_limiter - nocache
session.gc_maxlifetime - 7200
soap.wsdl_cache_limit - 5
opcache.max_accelerated_files - 2000
opcache.max_file_size - 0
opcache.max_wasted_percentage - 5

 

This website stores cookies on your computer. These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media. To find out more about the cookies we use, see our Privacy Policy.