Forum for discussing general topics related to Couch.
2 posts Page 1 of 1
i have a client that has past documents he wants to show on their web site. Some of the docs were written pre-1970. When we upload the doc and it's description via the CMS, we want to set the publish date in "advanced settings" to that date. However, whenever we set it to a pre-1970 year, the system automatically sets the date to Jan. 1, 1970.

Can we over-ride this setting somehow?

thanks
Hi Aman,

That, unfortunately, is a known limitation of pre 5.1.0 PHP. Quoting from PHP docs -
Before PHP 5.1.0, negative timestamps were not supported under any known version of Windows and some other systems as well. Therefore the range of valid years was limited to 1970 through 2038

My suggestion would be to use an editable region of type 'datetime' instead of the system publish-date -
Code: Select all
<cms:editable
    name='my_datetime'
    type='datetime'
    label='Document publish date'
/> 

You'll need to activate the 'DataBound Form' addon for using the above region. To do that, please edit 'couch/addons/kfunctions.php' file and remove the '//' before the following line (so as to uncomment it) -
require_once( K_COUCH_DIR.'addons/data-bound-form/data-bound-form.php' );
2 posts Page 1 of 1