12345678910111213141516171819202122232425262728 |
- import time
- from datetime import datetime, timedelta, timezone
- def main():
- '''
- seconds = time.time()
- print(int(seconds))
- # Local time
- local_time = time.ctime(time.time())
- print(type(local_time))
- print(local_time)
- print(time.localtime())
- '''
- '''
- print(timezone.utc)
- d = datetime.now(timezone.utc).astimezone()
- print(d)
- utc_offset = d.utcoffset() // timedelta(seconds=1)
- print(utc_offset)
- '''
-
- print(f'RTC: {time.ctime(1722011409)}. Unix time stamp:')
- if __name__ == '__main__':
- main()
|