Guest User

Untitled

a guest
Apr 25th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. <?
  2. putenv("TZ=Europe/Copenhagen");
  3.  
  4. $secsLeft = "";
  5. $nextDate = "";
  6.  
  7. if (strtotime("21:20") < time())
  8. {
  9. $secsLeft = strtotime("tomorrow 21:20") - time();
  10. $nextDate = date("Ymd", strtotime("tomorrow"));
  11. }
  12. else
  13. {
  14. $secsLeft = strtotime("21:20") - time();
  15. $nextDate = date("Ymd");
  16. }
  17. ?>
  18.  
  19. <general>
  20. <secsLeft><? echo $secsLeft; ?></secsLeft>
  21. <nextDate><? echo $nextDate; ?></nextDate>
Add Comment
Please, Sign In to add comment