Angular datetime format

  

<!DOCTYPE html>
<html lang="en">
<head> <script type="text/javascript"> var model = angular.module("ngapp", []); model.controller("Initial", ['$scope', '$http', '$filter', '$sce', function ($scope, $http, $filter, $sce) { $scope.Now = new Date(); // UTC, GMT +0, not local time
$scope.TimeZoneOffSet = -(new Date().getTimezoneOffset()) / 60; // local timezone offset


}); </script> </head> <body>
<div> {{Now | date: 'yyyy/MM/dd HH:mm:ss' : TimeZoneOffSet}} </div>
</body> </html>
上一篇:python json.load 的奇葩错误


下一篇:Validation failed for query for method public abstract boxfish.bean.Student boxfish.service.StudentServiceBean.find(java.lang.String)!