-2
It’s all right but when it comes time to display or save the date in the bank, it’s getting so 1919/1010/20181818 03:15:16 PM... I don’t know what problem, or if I made a mistake somewhere. Does anyone know why this?? can see that the time is right but only happens on the date.
Page Settings(php):
(index)
$this->form_validation->set_rules('dateformat', lang('date_format'), 'required');
$this->form_validation->set_rules('timeformat', lang('time_format'), 'required');
($date)
'dateformat' => DEMO ? 'jS F Y' : $this->input->post('dateformat'),
'timeformat' => DEMO ? 'h:i A' : $this->input->post('timeformat'),
footer:
<script type="text/javascript">
var base_url = '<?=base_url();?>';
var dateformat = '<?=$Settings->dateformat;?>', timeformat = '<?= $Settings->timeformat ?>';
<?php unset($Settings->protocol, $Settings->smtp_host, $Settings->smtp_user, $Settings->smtp_pass, $Settings->smtp_port, $Settings->smtp_crypto, $Settings->mailpath, $Settings->timezone, $Settings->setting_id, $Settings->default_email, $Settings->version, $Settings->stripe, $Settings->stripe_secret_key, $Settings->stripe_publishable_key); ?>
var Settings = <?= json_encode($Settings); ?>;
$(window).load(function () {
$('.mm_<?=$m?>').addClass('active');
$('#<?=$m?>_<?=$v?>').addClass('active');
});
</script>
Página all.js:
$('.clock').click( function(e){
e.preventDefault();
return false;
});
function Now() { return new Date().getTime(); }
var stamp = Math.floor(Now() / 1000);
var time = date(dateformat+' '+timeformat, stamp);
$('.clock').text(time);
window.setInterval(function(){
var stamp = Math.floor(Now() / 1000);
var time = date(dateformat+' '+timeformat, stamp);
$('.clock').text(time);
}, 10000);
Header page:
<li class="hidden-xs hidden-sm"><a href="#" class="clock"></a></li>
Friend, welcome to the stack overflow forum. .
– gabrielfalieri
https://answall.com/help/mcve
– user60252
Really. The problem misses that the parameter was being passed by the seat, dd/mm/Yyyy. I changed to d/m/Y.
– Yago Tomaz