You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

example5.py 601B

  1. from pms_api import SixfabPMS, Definition, Event
  2. import time
  3. pms = SixfabPMS()
  4. epoch = time.time() # to get timestamp in seconds in GMT0
  5. # to get local time on raspberry pi
  6. localtime = time.asctime( time.localtime(time.time()) )
  7. print("Local current time :", localtime)
  8. # to get timezone difference as minus
  9. print(time.timezone)
  10. # standard epoch time with no location specific
  11. print("Epoch Time: " + str(int(epoch)))
  12. # to calculate epoch with respect to local time
  13. # use it for setRTCTime() function as timestamp (epoch - time.timezone)
  14. print("Epoch Local: " + str(int(epoch) - time.timezone))