Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function gettimeoffset()
- {
- $returnvalue = 0;
- sc_lookup(tim, "select timeoffset from settings where settingsid = 1");
- if (!empty({tim[0][0]})) {
- $returnvalue = {tim[0][0]};
- }
- return $returnvalue;
- }
- function datemath ($offsetamt, $fromdate)
- {
- $returndate = date("Y-m-d H:i:s", strtotime($offsetamt, strtotime($fromdate)));
- return $returndate;
- }
- function datemathdate ($offsetamt, $fromdate)
- {
- $returndate = date("Y-m-d", strtotime($offsetamt, strtotime($fromdate)));
- return $returndate;
- }
- function 12to24 ($starthr, $startmin)
- {
- $starttime = $starthr.":".$startmin;
- return $starttime;
- }
- function gethr ($time24)
- {
- $hr = substr(trim($time24),0,2);
- return $hr;
- }
- function getmin ($time24)
- {
- $min = substr(trim($time24),3,2);
- return $min;
- }
- function my_dateformat ($incoming)
- {
- $dte = date_create($incoming);
- $returnvalue = date_format($dte,"m/d/Y");
- return $returnvalue;
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement