daily pastebin goal
42%
SHARE
TWEET

Untitled

a guest Oct 15th, 2018 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <html>
  2. <head><style>
  3. body{
  4. background-color:black;
  5. color:white;
  6. font-size:36pt;
  7. }
  8. img{
  9.     height:100%;
  10. }
  11. #text {
  12.     position:absolute;
  13.     padding-left: 200px;
  14. }
  15. div{
  16. display:inline-block;
  17. }
  18.  
  19. </style></head>
  20. <body>
  21. <div id='pic'>
  22. <img src="https://cdn.star.nesdis.noaa.gov/GOES16/ABI/FD/GEOCOLOR/20182882115_GOES16-ABI-FD-GEOCOLOR-1808x1808.jpg"></img>
  23. </div>
  24. <div id='text'><p id='utc'></p>
  25. <p id='local'></p>
  26. </div>
  27. </body>
  28. <script>
  29.  
  30.  
  31. function startTime() {
  32.   var today = new Date();
  33.   var zh = today.getUTCHours();
  34.   var h = today.getHours();
  35.   var zm = today.getUTCMinutes();
  36.   var m = today.getMinutes();
  37.   var zs = today.getUTCSeconds();
  38.   var s = today.getSeconds()
  39.   if (zh > 24) {
  40.     zh = zh - 24;
  41.   }
  42.   if(h > 24){
  43.     h = h - 24;
  44.   }
  45.   if (zh < 0) {
  46.     zh = zh + 24;
  47.   }
  48.   if (h < 0) {
  49.     h = h + 24;
  50.   }  
  51.   zh = checkTime(zh);
  52.   zm = checkTime(zm);
  53.   zs = checkTime(zs);
  54.  
  55.   h = checkTime(h);
  56.   m = checkTime(m);
  57.   s = checkTime(s);
  58.   document.getElementById('utc').innerHTML = 'GMT-0 Time: ' + zh + ":" + zm + ":" + zs;
  59.   document.getElementById('local').innerHTML = 'Local Time: ' + h + ":" + m + ":" + s;
  60.   var t = setTimeout(function() {
  61.     startTime()
  62.   }, 500);
  63. }
  64.  
  65. function checkTime(i) {
  66.   if (i < 10) {
  67.     i = "0" + i
  68.   };
  69.   return i;
  70. }
  71.  
  72. startTime()
  73. </script>
  74. </html>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top