SHARE
TWEET

Untitled

a guest Mar 26th, 2020 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.    
  3. function gettimeoffset()
  4. {
  5.     $returnvalue = 0;
  6.     sc_lookup(tim, "select timeoffset from settings where settingsid = 1");
  7.     if (!empty({tim[0][0]}))        {
  8.         $returnvalue = {tim[0][0]};
  9.     }
  10.     return $returnvalue;
  11. }
  12.    
  13.    
  14. function datemath ($offsetamt, $fromdate)
  15. {
  16.     $returndate = date("Y-m-d H:i:s", strtotime($offsetamt, strtotime($fromdate)));
  17.     return $returndate;
  18. }
  19.  
  20. function datemathdate ($offsetamt, $fromdate)
  21. {
  22.     $returndate = date("Y-m-d", strtotime($offsetamt, strtotime($fromdate)));  
  23.     return $returndate;
  24. }
  25.  
  26. function 12to24 ($starthr, $startmin)  
  27. {
  28.     $starttime = $starthr.":".$startmin;
  29.     return $starttime;
  30. }
  31.  
  32. function gethr ($time24)
  33. {
  34.     $hr = substr(trim($time24),0,2);
  35.     return $hr;
  36. }
  37.  
  38. function getmin ($time24)
  39. {
  40.     $min = substr(trim($time24),3,2);
  41.     return $min;
  42. }
  43.  
  44. function my_dateformat ($incoming)
  45. {
  46.     $dte = date_create($incoming);
  47.     $returnvalue = date_format($dte,"m/d/Y");  
  48.     return $returnvalue;
  49. }
  50.  
  51. ?>
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