Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. # Mocking up daylight savings time detection
  2. # with primitive Arduino Time API.
  3. xday = day-weekday
  4. if (month > 3 and month < 11):
  5.     dst = "DST"
  6. elif (month == 3):
  7.     if (xday >= 7):
  8.         dst = "DST"
  9.     elif (xday >= 0):
  10.         if (weekday > 1):
  11.             dst = "DST"
  12.         elif (hour >= 2):
  13.             dst = "DST"
  14. elif (month == 11):
  15.     if (xday >= 14):
  16.         dst = "DST"
  17.     elif (xday >= 7):
  18.         if (weekday > 1):
  19.             dst = "DST"
  20.         elif (hour >= 2):
  21.             dst = "DST"
  22. # www-bot-thoughts.com