今天默认的日期和时间从服务器

问题描述:

需要设置在日期时间服务器默认的日期和时间picker.I可以选择的setDate但我需要设置今天强调了服务器的日期,现在单击按钮,它应该显示服务器日期和时间。请提供一些解决方案。今天默认的日期和时间从服务器

http://trentrichardson.com/examples/timepicker/

https://github.com/trentrichardson/jQuery-Timepicker-Addon

var dt = new Date("2015 10 12,10:00:00"); 

$('#basic_example_1').datetimepicker(); 
$("#basic_example_1").datetimepicker('setDate', dt); 

DEMO

+0

什么服务器端代码您使用 –

包围您这样的代码

<script type="text/javascript"> 
var dt = new Date("<?php echo date('Y m d,H:i:s'); ?>"); 

$('#basic_example_1').datetimepicker(); 
$("#basic_example_1").datetimepicker('setDate', dt); 
</script> 
+0

FO r点击现在需要设置服务器时间...它显示客户端时间.. – Manoj