<!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>

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-01-10
  • 2021-11-23
  • 2021-05-21
  • 2022-01-23
猜你喜欢
  • 2021-12-29
  • 2022-12-23
  • 2022-12-23
  • 2021-10-10
  • 2022-12-23
相关资源
相似解决方案