Hi! How do I show my current system (PC) time on a form
Right now I’m currently using a datetimepicker, I wanna try when I’m going to create something in a form the “time_start” will automatically get the time that is being used on my PC.
<?= $form->field($model, 'time_start')->widget(
DateTimePicker::className(), [
'options' => ['placeholder' => 'Render Time'],
'pluginOptions' => ['autoclose' => true,]
]
); ?>
For example a basic PHP time function like this
<?php
$t=time();
echo($t . "<br>");
echo(date("Y-m-d",$t));
?>