我使用UTC将日期保存在mysql数据库中作为datetime,所以如果cst time是2014-07-22 10:34 am in the db,它将保存为2014-07-22 15:34。在本地测试应用程序时,使用本地数据库或连接到远程数据库的osx 10.9会将其正确格式化为2014-07-22上午10:34当在服务器ubuntu + nginx + sailsjs上运行应用程序时,日期为在服务器上,我已经使用tzconfig设置了正确的时区,它将local显示为cst,将universal显示为utc。如上所述,我可以连接本地sa
让我们考虑一下自定义扩展.cst,我们有一个javascript函数CSTReader(),它专门设计来读取.cst文件。以下是一个例子:I am a cst file.I have data in me such that I am readable by javascript. document.write("Reqd Output : " +CSTReader("files.cst") );
产出