Language/Python
python timestamp
KyeongRok Kim
2018. 2. 14. 15:16
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | import datetime print( datetime.datetime.fromtimestamp(int("1284101485")).strftime('%Y-%m-%d %H:%M:%S') ) convertDate = lambda x: datetime.datetime.fromtimestamp(x).strftime('%Y-%m-%d %H:%M:%S') list = [ 1518551100000,1518573600000,1518535800000,1518541200000,1518541200000,1518548400000,1518541200000, 1518550200000,1518597000000,1518606000000, 1518551100000,1518575400000,1518539400000,1518548400000,1518544800000,1518537600000,1518605100000, 1518602400000,1518534600000,1518551100000, 1518551100000,1518551100000,1518551100000,1518551100000,1518551100000,1518551100000,1518551100000, ] aList = map(convertDate, map(lambda x: x / 1000, list)) for item in aList: print(item) | cs |
파이썬 타임스탬프 처리